Commit 2b1288ed by huyue

init

1 parent cdf01a19
node_modules
/dist
# local env files
.env.local
.env.*.local
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
{
"printWidth": 200,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "none",
"semi": false,
"wrap_line_length": 120,
"wrap_attributes": "auto",
"proseWrap": "always",
"arrowParens": "avoid",
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "ignore",
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"jsxBracketSameLine": true,
"files.insertFinalNewline": true,
"useTabs": false,
"eslintIntegration": true,
"overrides": [
{
"files": ".prettierrc",
"options": {
"parser": "json"
}
}
],
"endOfLine": "auto"
}
/* 定义全局变量 */
:root {
--bgColor: #F4F5FA;
--btnBlue:#5850FF ;
}
/* 2、定义某元素下的变量 */
/* .look{
--borderColor: #ccc;
} */
.searchInputBtn{
margin-left: 20px;
}
.creater,.status{
/* margin-top: 40px; */
margin-right: 20px;
}
.secondInput{
margin-top: 40px;
}
.selector{
width: 120px;
margin-right: -4px;
}
.layui-layer-content {
white-space: pre-line;
}
div.layui-form-item{
margin-bottom: 0;
}
.layui-form-item .twocol{
height: 78px;
display: flex;
justify-content: space-between;
align-items: center;
background-color: #fff;
}
/* 分割线 */
.divideLine{
position: absolute;
z-index: 99;
top: 78px;
left: 0;
width: 100%;
height: 20px;
background-color: var(--bgColor);
}
/* 位置相关样式 */
.mt40{
margin-top: 40px;
}
#updateCircleAngle{
border-top-left-radius: 0;
border-bottom-left-radius:0 ;
border-left: none;
}
.updateSelectAngle .layui-select-title .layui-input{
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
\ No newline at end of file \ No newline at end of file
.bg-white {
/* background-color: #F7F7F7; */
/* margin: 20px; */
}
.content-title {
position: relative;
height: 48px;
background-color: #fff;
font-size: 16px;
font-weight: 600;
color: #333333;
line-height: 48px;
/* margin-top: 8px; */
/* margin:8px 20px 15px 20px; */
padding-left: 20px;
}
.content-title h3{
margin-left: 20px;
}
.detail {
height: 100%;
}
.add .layui-input-block,
.detail .layui-input-inline {
width: 360px;
}
.add .layui-form-label,
.detail .layui-form-label {
width: 110px;
}
.add .layui-input-block,
.detail .layui-input-block {
margin-left: 140px;
}
.detail .layui-form-item {
margin-bottom: 0;
}
.detail .wrapper-tree {
/* width:230px; */
overflow:auto;
margin-left: 50px;
max-height: calc(100vh - 350px);
margin: 15px;
padding-bottom: 15px;
}
.content-title.layui-form {
position: relative;
}
.content-title.layui-form .layui-form-select {
display: inline-block;
width: 220px;
position: absolute;
right: 20px;
top: 50%;
transform: translateY(-50%);
}
.layui-upload-img {
position: relative;
width: 80px;
height: 80px;
border: 1px dashed #eee;
background-color: #F7F7F7;
cursor: pointer;
}
.layui-upload-img i{
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.align-center {
text-align: center;
}
.title-right {
position: absolute;
right: 20px;
top: 50%;
transform: translateY(-50%);
font-size: 14px;
font-weight: 500;
color: #333333;
}
\ No newline at end of file \ No newline at end of file
/*-------------------------------------
layui 样式自定义
-------------------------------------*/
/* 定义全局变量 */
:root {
--bgColor: #F4F5FA;
--btnBlue:#5850FF;
--borderBlue:#5850FF;
--btnHeight:32px;
}
.layui-form-checkbox[lay-skin=primary] span:hover{
background: #fff;
}
.layui-btn+.layui-btn {
margin-left: 20px;
}
.layui-input:focus,
.layui-textarea:focus {
border-color: var(--borderBlue) !important;
}
.layui-input{
border-radius: 4px;
}
.layui-input, .layui-select, .layui-textarea{
height: 32px;
}
.layui-form-pane .layui-input{
border-radius: 0 4px 4px 0;
}
.layui-form-pane .layui-input-inline{
margin-left: -4px;
}
.layui-form-pane .layui-form-item[pane]{
border-style: none;
}
.layui-form-label.required::before {
content: '*';
display: inline-block;
color: red;
margin-right: 5px;
}
.layui-form-label{
padding: 6px 15px;
}
.layui-laypage-btn,.layui-btn {
background-color: var(--btnBlue) !important;
border-radius: 4px;
color: #ffffff;
}
.layui-btn{
font-size: 14px;
height: 32px;
line-height: 32px;
}
/* .layui-btn, .add-circle, .btn-no-border{
background-color: #1989FA!important;
height: 16px !important;
width: 16px !important;
border-radius: 50% !important;
} */
.layui-laypage-em {
background-color: var(--btnBlue) !important;
}
.layui-btn-xs {
color: var(--btnBlue);
font-size: 14px;
height: 14px;
font-weight: 400;
line-height: 14px;
cursor: pointer;
}
.layui-btn-xs:hover {
color: var(--btnBlue);
}
.layui-form-select dl dd.layui-this {
background-color: var(--btnBlue);
}
.layui-form-checked[lay-skin=primary] i {
border-color: var(--btnBlue) !important;
background-color: var(--btnBlue);
color: #fff;
}
.layui-form-checkbox[lay-skin=primary]:hover i {
border-color: var(--borderBlue) !important;
color: #fff;
}
.layui-form-checked span,
.layui-form-checked:hover span {
background-color: var(--btnBlue);
}
.layui-form-checked i,
.layui-form-checked:hover i {
color: var(--btnBlue);
}
.layui-laydate .layui-laydate-content .layui-this {
background-color: var(--btnBlue) !important;
color: #fff !important;
}
.layui-tab-brief>.layui-tab-title .layui-this {
color: #333333;
font-weight: 500;
}
.layui-tab-title li{
color: #999999;
}
.layui-tab-card>.layui-tab-title .layui-this{
color: var(--btnBlue);
}
.layui-tab-card>.layui-tab-title{
background-color: #F4F6FC;
}
.layui-tab-brief>.layui-tab-more li.layui-this:after,
.layui-tab-brief>.layui-tab-title .layui-this:after {
border-bottom: 2px solid var(--borderBlue);
}
.layui-disabled, .layui-disabled:hover{
color: #999!important;
/* font-family: PingFangSC-Regular, PingFang SC; */
}
.layui-tab-content xm-select {
border-color: #E6E6E6!important;
}
.xm-label-block {
background-color: var(--btnBlue)!important;
}
.selected i.xm-icon-duox{
color: var(--btnBlue)!important;
}
.xm-option-icon, .xm-iconfont, .xm-icon-duox{
border-color:var(--borderBlue)!important;
}
/* 分页器的修改 */
.layui-laypage button{
border-radius: 4px;
font-family: PingFang-Regular;
}
.layui-laypage .layui-laypage-skip input:focus{
border-color: var(--borderBlue)!important;
}
.layui-laypage a, .layui-laypage span,.layui-laypage .layui-laypage-skip{
font-size: 14px;
/* font-family: PingFangSC-Regular, PingFang SC; */
font-weight: 400;
color: #666666;
}
.layui-laypage a:hover{
color: #5850FF;
}
/* 开关颜色 */
.layui-form-onswitch{
border-color: var(--borderBlue);
background-color: var(--btnBlue);
}
.layui-table-header table .layui-table-cell {
height: 54px;
line-height: 54px;
}
/* 表格行内容高度自适应 */
/* .layui-table-header table .layui-table-cell {
height: auto;
line-height: 20px;
} */
.layui-table-cell{
/* min-height: 54px; */
height: auto;
/* line-height: 20px; */
/* white-space: pre-wrap;
box-sizing: content-box;
line-height: 20px;
padding: 16px 0; */
white-space: normal;
overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
display: -webkit-box;
word-break: break-all;
padding:0 6px;
}
.layui-table tr{
display: flex;
}
.layui-table-view .layui-table td,.layui-table-view .layui-table th {
/* padding: 13px 0; */
padding: 0px 0;
border-top: none;
border-left: none;
min-height: 54px;
display: flex;
align-items: center;
}
/* .layui-table-cell, .layui-table-tool-panel li{
white-space: pre-wrap;
} */
.layui-table-cell li{
list-style-type: none;
}
.layui-table-cell li::before{
/* list-style: disc;
list-style-position: inside; */
content: "\2022";
color: var(--btnBlue);
margin-right: 5px;
}
.layui-table-cell li::marker{
/*谷歌浏览器有::marker伪元素,ie浏览器没有,故使用伪元素替代蓝色原点*/
/* color:#1989FA ; */
}
/* 表格去所有边框 */
.layui-table td, .layui-table th, .layui-table-col-set, .layui-table-fixed-r,
.layui-table-grid-down, .layui-table-header, .layui-table-page,
.layui-table-tips-main, .layui-table-tool, .layui-table-total,
.layui-table-view, .layui-table[lay-skin=line], .layui-table[lay-skin=row]{
border-style: none;
}
.layui-table-body tbody tr:not(:last-child){
border-bottom: 1px solid #DCDFE6;
}
.layui-table-box{
border-bottom: 1px solid #DCDFE6;
}
/* 设置表头颜色 */
.layui-table thead tr{
background-color: #F4F6FC;
color: #333333;
font-size: 14px;
}
.layui-table thead tr span{
font-size: 14px;
font-weight: 700;
}
.layui-layer-btn{
text-align: center!important;
border-radius: 4px!important;
}
.layui-layer-btn .layui-layer-btn0{
border-color: var(--borderBlue)!important;
background-color: var(--btnBlue)!important;
}
.layui-tab-content{
padding: 0;
}
.layui-form-item .layui-input-inline{
margin-right: 0;
}
/*滚动条样式 layui-table-body layui-table-main */
.layui-table-body::-webkit-scrollbar {
width: 5px;
height: 5px;
/* display: none; */
}
/*正常情况下滑块的样式*/
.layui-table-body::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.05);
border-radius: 5px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在该类指向的控件上时滑块的样式*/
.layui-table-body::-webkit-scrollbar-thumb {
/* background-color: rgba(0, 0, 0, 0.2); */
background: #e9e8ff;
border-radius: 10px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在滑块上时滑块的样式*/
/* &::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.4);
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
} */
/*正常时候的主干部分*/
.layui-table-body::-webkit-scrollbar-track {
border-radius: 10px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
background-color: white;
}
/*鼠标悬浮在滚动条上的主干部分*/
/* .el-table__body-wrapper::-webkit-scrollbar-track:hover {
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4);
background-color: rgba(0, 0, 0, 0.01);
} */
.layui-tab-card {
border-width: 1px;
border-style: solid;
border-radius: 2px;
box-shadow:none;
/* 0 2px 5px 0 rgb(0 0 0 / 10%) */
}
/* layui时间选择器 */
.laydate-footer-btns span:hover{
color: var(--btnBlue)!important;
}
.laydate-set-ym span:hover{
color: var(--btnBlue)!important;
}
.layui-laydate-header i:hover, .layui-laydate-header span:hover{
color:var(--btnBlue)!important;
}
.layui-form-radioed>i ,.layui-form-radioed,.layui-form-radio:hover *{
color:var(--btnBlue)!important;
}
\ No newline at end of file \ No newline at end of file
@import url('https://img02.glsx.com.cn/layui/css/layui.css');
@import url('./layui.css');
html,
body {
height: 100%;
}
#app {
display: flex;
flex-direction: column;
height: 100%;
background: #F7F7F7;
}
main {
height: 100%;
}
.bgwrap {
height: 353px;
position: relative;
}
.bgwrap img {
width: 100%;
height: 100%;
}
.bgwrap .systemName {
position: absolute;
left: 226px;
bottom: 29px;
}
.bgwrap .systemName h2 {
height: 56px;
font-size: 40px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
line-height: 56px;
text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.2);
}
.bgwrap .systemName p {
height: 28px;
font-size: 20px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 0.7);
line-height: 28px;
text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.2);
}
.wrap {
/* display: flex;
justify-content: center;
align-items: center; */
/* height: 100%; */
}
.wrap form {
width: 400px;
height: 419px;
position: fixed;
top: 240px;
right: 269px;
background: #FFFFFF;
box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.1);
border-radius: 4px;
}
.wrap form .title {
height: 60px;
background: #F7F7F7;
display: flex;
justify-content: center;
align-items: center;
font-size: 18px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 24px;
}
.wrap form .items {
padding-top: 40px;
}
.wrap form .items .accountName,
.pwd {
height: 16px;
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
padding: 9px 10px 9px 22px;
line-height: 16px;
}
.wrap form .items .layui-form-item {
margin-bottom: 25px;
}
.wrap form .items .layui-form-item .layui-input-inline {
width: 252px;
}
.wrap form .btn-login {
margin-left: 38px;
}
.wrap form .btn-login .layui-btn {
width: 324px;
height: 40px;
background: #1989FA;
border-radius: 4px;
margin-top: 25px;
}
\ No newline at end of file \ No newline at end of file
@import url('https://img02.glsx.com.cn/layui/css/layui.css');
@import url('./ztree.css');
@import url('./layui.css');
@import url('./employee.css');
html, body {
height: 100%;
font-family:PingFang-Regular;
}
@font-face {
font-family:'PingFang-Regular';
src: url("../font/PingFang-Regular.ttf");
}
#app {
display: flex;
flex-direction: column;
height: 100%;
background-color: #F4F5FA;
padding: 0 20px 0 40px;
}
header {
height: 48px;
flex-shrink: 0;
}
main::-webkit-scrollbar {
display: none;
}
.header {
height: 100%;
background: #fff;
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
display: flex;
justify-content: space-between;
padding: 0 20px;
}
.upload-img-box{
margin-right: 10px;
background-color: #f7f7f7;
}
.header-nav {
display: flex;
align-items: center;
}
.header-nav .header-nav-item {
width: 90px;
height: 32px;
text-align: center;
line-height: 32px;
background-color: #F7F7F7;
font-size: 14px;
font-weight: 400;
color: #37383A;
border: 1px solid #F7F7F7;
}
.header-nav .header-nav-item a {
color: #37383A;
}
.header-nav .header-nav-item.active, .header-nav .header-nav-item:hover {
background-color: #fff;
}
.header-nav .header-nav-item.active a, .header-nav .header-nav-item:hover a {
color: #3D94FF;
}
.header-nav .header-nav-item:nth-child(1) {
border-radius: 4px 0 0 4px;
}
.header-nav .header-nav-item:nth-child(3) {
border-radius: 0 4px 4px 0;
}
.header-user {}
.header-user .layui-nav {
background-color: transparent;
}
.header-user .layui-nav .layui-nav-item {
line-height: 48px;
}
.header-user .layui-nav .layui-nav-item .layui-nav-child {
top: 48px;
left: 25px;
}
.header-user .layui-nav .layui-nav-item a {
color: #262626;
}
.header-user .layui-nav .layui-nav-item a i.layui-nav-more {
right: -20px;
color: #8C8C8C;
}
main {
flex: 1;
min-height: calc(100% - 60px - 30px);
overflow: auto;
background-color: #F4F5FA;
/* ie浏览器滚动条 */
/* -ms-scroll-chaining: chained;
-ms-overflow-style: none; */
}
/* .context-block {
height: 100%;
} */
.search-block {
/* padding: 8px 20px; */
position: relative;
background-color: #fff;
/* margin: 8px 20px 0; */
padding: 0 20px 0;
height: 100%;
}
main .table-page{
margin-top: 16px;
}
main .table-page tr th:last-child .layui-table-cell{
text-align: center;
}
main .input-downtips{
color: #FF6D00;
}
footer {
height: 30px;
flex-shrink: 0;
}
.footer {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
color: #37383A;
}
.clearfix {
zoom: 1;
}
.clearfix::after {
content: "";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.pr-parent-ul {
display: flex;
}
.op0 {
opacity: 0;
}
.op1 {
opacity: 1;
}
.createBtn{
display: flex;
align-items: center;
}
.createBtn span{
margin-left: 2px;
}
.footer-close {
text-align: center;
width: 100%;
background-color: #fff;
position: fixed;
bottom: 0;
left:0;
height: 64px;
line-height: 64px;
}
.footer-close button{
width: 68px;
height: 40px;
padding: 0;
}
.layui-tab-title {
background-color: #F4F6FC;
border-radius: 4px;
border: none;
}
.layui-tab-title .layui-this:after {
border: none;
}
.layui-tab-brief>.layui-tab-title .layui-this,
.layui-tab-title .layui-this {
color: #5850FF;
background-color: #fff;
}
.layui-tab-title .layui-this {
transform: scale(0.97, 0.9);
}
.layui-tab-title,.layui-tree-box .layui-this {
transform: scale(1);
}
.layui-tab-title li {
width: 180px;
}
.layui-tab-content {
/* margin-top: 20px; */
/* background-color: #fff; */
}
.layui-tab-content .layui-form-pane .layui-form-label {
background-color: #fff;
border: none !important;
}
.layui-tree-box {
padding: 10px;
background-color: #F4F6FC;
}
.layui-tab-form {
margin-top: 20px;
}
.layui-top-tab.layui-tab-brief>.layui-tab-title .layui-this {
background-color: #F4F6FC;
}
.m-t-md {
margin-top: 20px;
}
.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;
}
.removeCheckBg .layui-form-checked:hover span {
/* .layui-form-checked span, */
background-color: #fff;
}
/* 修改下拉框和输入框链接的圆角 */
.updateCircleAngle{
border-top-left-radius: 0;
border-bottom-left-radius:0 ;
border-left: none;
}
#updateCircleAngle{
border-top-left-radius: 0;
border-bottom-left-radius:0 ;
border-left: none;
}
.updateSelectAngle .layui-select-title .layui-input{
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
/* .detail .wrapper-tree */
/*滚动条样式 detail .wrapper-tree layui-table-main */
.wrapper-tree::-webkit-scrollbar {
width: 10px;
height: 10px;
/* display: none; */
}
/*正常情况下滑块的样式*/
.wrapper-tree::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.05);
border-radius: 10px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在该类指向的控件上时滑块的样式*/
.wrapper-tree::-webkit-scrollbar-thumb {
/* background-color: rgba(0, 0, 0, 0.2); */
background: #e9e8ff;
border-radius: 10px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在滑块上时滑块的样式*/
/* &::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.4);
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
} */
/*正常时候的主干部分*/
.wrapper-tree::-webkit-scrollbar-track {
border-radius: 10px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
background-color: white;
}
/*ztree*/
.ztree::-webkit-scrollbar {
width: 10px;
height: 10px;
/* display: none; */
}
/*正常情况下滑块的样式*/
.ztree::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.05);
border-radius: 10px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在该类指向的控件上时滑块的样式*/
.ztree::-webkit-scrollbar-thumb {
/* background-color: rgba(0, 0, 0, 0.2); */
background: #e9e8ff;
border-radius: 10px;
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}
/*鼠标悬浮在滑块上时滑块的样式*/
/* &::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.4);
box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
} */
/*正常时候的主干部分*/
.ztree::-webkit-scrollbar-track {
border-radius: 10px;
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
background-color: white;
}
\ No newline at end of file \ No newline at end of file
.wrapper-merchant {
display: inline-flex;
}
.merchant-left {
width: 500px;
box-sizing: border-box;
padding-left: 20px;
}
.merchant-right {
flex: 1;
}
\ No newline at end of file \ No newline at end of file
/*-------------------------------------
zTree Style
version: 3.5.19
author: Hunter.z
email: hunter.z@263.net
website: http://code.google.com/p/jquerytree/
-------------------------------------*/
:root {
--bgColor: #F4F5FA;
--btnBlue:#5850FF ;
}
.ztree * {
padding: 0;
margin: 0;
font-size: 12px;
/* font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif */
}
.ztree {
margin: 0;
padding: 5px;
color: #333
}
.ztree li {
padding: 0;
margin: 0;
list-style: none;
/*limin line-height: 14px;*/
line-height: 28px;
text-align: left;
white-space: nowrap;
outline: 0
}
.ztree li ul {
margin: 0;
padding: 0 0 0 18px
}
.ztree li ul.line {
background: url(./img/line_conn.gif) 0 0 repeat-y;
}
.ztree li a {
/** padding: 1px 3px 0 0; limin**/
padding: 1px 3px 0 8px;
margin: 0;
cursor: pointer;
/** height: 17px; limin**/
height: 17px;
color: #262626;
background-color: transparent;
text-decoration: none;
vertical-align: top;
display: inline-block
}
.ztree li a:hover {
text-decoration: underline
}
.ztree li a.curSelectedNode {
/* padding-top: 0px; */
/* background-color: #FFE6B0; */
color: var(--btnBlue);
/** height: 16px; limin**/
/* height: 28px; */
/* border: 1px #3D94FF solid; */
opacity: 0.8;
}
.ztree li a.curSelectedNode_Edit {
/* padding-top: 0px; */
/* background-color: #FFE6B0; */
color: var(--btnBlue);
/* height: 16px; */
/* border: 1px #3D94FF solid; */
opacity: 0.8;
}
.ztree li a.tmpTargetNode_inner {
padding-top: 0px;
background-color: var(--btnBlue);
color: white;
height: 16px;
border: 1px var(--btnBlue) solid;
opacity: 0.8;
filter: alpha(opacity=80)
}
.ztree li a.tmpTargetNode_prev {}
.ztree li a.tmpTargetNode_next {}
.ztree li a input.rename {
height: 14px;
width: 80px;
padding: 0;
margin: 0;
font-size: 12px;
border: 1px #7EC4CC solid;
*border: 0px
}
.ztree li span {
line-height: 16px;
margin-right: 2px
}
.ztree li span.button {
line-height: 0;
margin: 0;
width: 16px;
height: 16px;
display: inline-block;
vertical-align: middle;
border: 0 none;
cursor: pointer;
outline: none;
background-color: transparent;
background-repeat: no-repeat;
background-attachment: scroll;
background-image: url("./img/zTreeStandard.png");
*background-image: url("./img/zTreeStandard.gif")
}
.ztree li span.button.chk {
width: 13px;
height: 13px;
margin: 0 3px 0 0;
cursor: auto
}
.ztree li span.button.chk.checkbox_false_full {
background-position: 0 0
}
.ztree li span.button.chk.checkbox_false_full_focus {
background-position: 0 -14px
}
.ztree li span.button.chk.checkbox_false_part {
background-position: 0 -28px
}
.ztree li span.button.chk.checkbox_false_part_focus {
background-position: 0 -42px
}
.ztree li span.button.chk.checkbox_false_disable {
background-position: 0 -56px
}
.ztree li span.button.chk.checkbox_true_full {
background-position: -14px 0
}
.ztree li span.button.chk.checkbox_true_full_focus {
background-position: -14px -14px
}
.ztree li span.button.chk.checkbox_true_part {
background-position: -14px -28px
}
.ztree li span.button.chk.checkbox_true_part_focus {
background-position: -14px -42px
}
.ztree li span.button.chk.checkbox_true_disable {
background-position: -14px -56px
}
.ztree li span.button.chk.radio_false_full {
background-position: -28px 0
}
.ztree li span.button.chk.radio_false_full_focus {
background-position: -28px -14px
}
.ztree li span.button.chk.radio_false_part {
background-position: -28px -28px
}
.ztree li span.button.chk.radio_false_part_focus {
background-position: -28px -42px
}
.ztree li span.button.chk.radio_false_disable {
background-position: -28px -56px
}
.ztree li span.button.chk.radio_true_full {
background-position: -42px 0
}
.ztree li span.button.chk.radio_true_full_focus {
background-position: -42px -14px
}
.ztree li span.button.chk.radio_true_part {
background-position: -42px -28px
}
.ztree li span.button.chk.radio_true_part_focus {
background-position: -42px -42px
}
.ztree li span.button.chk.radio_true_disable {
background-position: -42px -56px
}
.ztree li span.button.switch {
width: 18px;
height: 18px
}
.ztree li span.button.root_open {
background-position: -92px -54px
}
.ztree li span.button.root_close {
background-position: -74px -54px
}
.ztree li span.button.roots_open {
background-position: -92px 0
}
.ztree li span.button.roots_close {
background-position: -74px 0
}
.ztree li span.button.center_open {
background-position: -92px -18px
}
.ztree li span.button.center_close {
background-position: -74px -18px
}
.ztree li span.button.bottom_open {
background-position: -92px -36px
}
.ztree li span.button.bottom_close {
background-position: -74px -36px
}
.ztree li span.button.noline_open {
background-position: -92px -72px
}
.ztree li span.button.noline_close {
background-position: -74px -72px
}
.ztree li span.button.root_docu {
background: none;
}
.ztree li span.button.roots_docu {
background-position: -56px 0
}
.ztree li span.button.center_docu {
background-position: -56px -18px
}
.ztree li span.button.bottom_docu {
background-position: -56px -36px
}
.ztree li span.button.noline_docu {
background: none;
}
.ztree li span.button.ico_open {
margin-right: 2px;
background-position: -110px -16px;
vertical-align: top;
*vertical-align: middle
}
.ztree li span.button.ico_close {
margin-right: 2px;
background-position: -110px 0;
vertical-align: top;
*vertical-align: middle
}
.ztree li span.button.ico_docu {
margin-right: 2px;
background-position: -110px -32px;
vertical-align: top;
*vertical-align: middle
}
.ztree li span.button.edit {
margin-right: 2px;
background-position: -110px -48px;
vertical-align: top;
*vertical-align: middle
}
.ztree li span.button.remove {
margin-right: 2px;
background-position: -110px -64px;
vertical-align: top;
*vertical-align: middle
}
.ztree li span.button.ico_loading {
margin-right: 2px;
background: url(./img/loading.gif) no-repeat scroll 0 0 transparent;
vertical-align: top;
*vertical-align: middle
}
ul.tmpTargetzTree {
background-color: #FFE6B0;
opacity: 0.8;
filter: alpha(opacity=80)
}
span.tmpzTreeMove_arrow {
width: 16px;
height: 16px;
display: inline-block;
padding: 0;
margin: 2px 0 0 1px;
border: 0 none;
position: absolute;
background-color: transparent;
background-repeat: no-repeat;
background-attachment: scroll;
background-position: -110px -80px;
background-image: url("./img/zTreeStandard.png");
*background-image: url("./img/zTreeStandard.gif")
}
ul.ztree.zTreeDragUL {
margin: 0;
padding: 0;
position: absolute;
width: auto;
height: auto;
overflow: hidden;
background-color: #cfcfcf;
border: 1px #00B83F dotted;
opacity: 0.8;
filter: alpha(opacity=80)
}
.zTreeMask {
z-index: 10000;
background-color: #cfcfcf;
opacity: 0.0;
filter: alpha(opacity=0);
position: absolute
}
/*limin*/
/* ul.level2 {
display: flex;
}
li.level3 span.switch.level3 {
opacity: 0;
} */
/* level style*/
/*.ztree li span.button.level0 {
display:none;
}
.ztree li ul.level0 {
padding:0;
background:none;
}*/
\ No newline at end of file \ No newline at end of file
No preview for this file type
<div class="footer">glsx</div>
<script></script>
<div class="header-wrap">
<div class="header">
<div class="header-nav">
<span class="header-nav-item"><a href="/html/merchant/index.html">商户管理</a></span>
<span class="header-nav-item"><a href="/html/employee/index.html">员工管理</a></span>
<span class="header-nav-item"><a href="/html/role/index.html">角色管理</a></span>
</div>
<div class="header-user">
<ul class="layui-nav">
<li class="layui-nav-item">
<a href="">
<img src="//t.cn/RCzsdCq" class="layui-nav-img" />
<span id="curMerchantName"></span>
</a>
<dl class="layui-nav-child">
<!-- <dd><a href="javascript:;">修改信息</a></dd> -->
<dd><a href="javascript:;" id="logout">退出</a></dd>
</dl>
</li>
</ul>
</div>
</div>
<div class="bread-crumb"></div>
</div>
<script>
layui.use(['element', 'request', 'helper'], function () {
var element = layui.element
var helper = layui.helper
element.init()
highlight()
bindEvents()
var href = location.href.split('/')
var isDxternal = isAppend()
if (isDxternal && href[href.length - 1] != 'login.html') {
var user = helper.store.get('user')
$('#curMerchantName').text(user.merchantName)
}
})
function highlight() {
var $ = layui.$
var _path = getPath()[0]
var _href = '/html/' + _path
$('.header-nav-item').each(function (i, e) {
var _hr = $(e).find('a').attr('href')
if (_hr.indexOf(_href) !== -1) {
// if (_hr.startsWith(_href)) {
$(e).addClass('active').siblings().removeClass('active')
return false
}
})
}
function bindEvents() {
$ = layui.$
request = layui.request
$('#logout').click(function () {
var sessionId = layui.store.get('token')
request({
sessionId: sessionId,
method: 'entmicro.api.example.logout'
}, function (result) {
goLogin()
})
})
}
function getPath() {
var _href = location.href.split('/')
var _path = _href.slice(_href.length - 2, _href.length)
return _path
}
</script>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8" />
<meta content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="修改有效期" />
<meta name="author" content="GLSX Web Team" />
<meta name="keywords" itemprop="keywords" content="广联,商户管理" />
<link rel="stylesheet" type="text/css" href="/css/main.css" />
<style>
.valid-period {
text-align: center;
padding: 20px 20px;
background-color: #ffffff;
}
</style>
<title>修改有效期</title>
</head>
<body>
<div id="app">
<main class="valid-period">
<form class="layui-form" lay-filter="periodFilter">
<div class="layui-form-item">
<div class="layui-form-label required" style="width: 120px">账户有效期:</div>
<div class="layui-input-inline" style="width: auto">
<select name="effectiveTime" id="periodSelect" required lay-verify="required">
<option value="">请选择</option>
</select>
<p class="input-downtips">(注:永久有效不超过所属工厂商户的有效期)</p>
</div>
<button id="periodVerifyBtn" lay-submit lay-filter="periodSubmit" style="display: none"></button>
<!-- <div class="layui-form-item" style="padding: 40px 20px;">
<div class="layui-input-inline">
<button class="layui-btn layui-btn-sm" lay-submit lay-filter="validSubmit">立即提交</button>
<button type="reset" class="layui-btn layui-btn-sm layui-btn-primary">重置</button>
</div>
</div> -->
</div>
</form>
</main>
</div>
<script src="https://img02.glsx.com.cn/layui/layui.js"></script>
<script src="/js/load.js"></script>
<script>
layui.use(['form', 'request', 'helper'], function () {
var form = layui.form
var request = layui.request
var $ = layui.$
var helper = layui.helper
var currLayerIdx = parent.layer.getFrameIndex(window.name)
var baseData = {}
var vaildData = {
id: getQueryString('id'),
effectiveTime: getQueryString('effectiveTime')
}
getVaildPeriod()
form.on('submit(periodSubmit)', function (data) {
// 调接口
var params = {
method: 'merchants.api.staff.updateValPerByStaffId',
effectiveTime: data.field.effectiveTime,
id: vaildData.id
}
request(params, function (res) {
if (res.code == '0') {
helper.store.set('isRefresh', true)
parent.layer.close(currLayerIdx)
}
})
return false
})
// 获取参数
function getQueryString(name) {
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i')
var r = window.location.search.substr(1).match(reg)
if (r != null) {
return unescape(r[2])
}
return null
}
// 获取有效期
function getVaildPeriod() {
request(
{
method: 'merchants.api.menu.findAllDictData',
dictType: 'staff_validity_period'
},
function (res) {
if (res.code === '0') {
baseData.effectiveTimeList = res.data
var periodSelect = $('#periodSelect')
$.each(baseData.effectiveTimeList, function (index, item) {
periodSelect.append(new Option(item.dictLabel, item.dictValue))
})
form.val('periodFilter', {
effectiveTime: vaildData.effectiveTime
})
form.render('select')
}
}
)
}
})
</script>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!--
* @Author: huyue
-->
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8" />
<meta content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="修改有效期" />
<meta name="author" content="GLSX Web Team" />
<meta name="keywords" itemprop="keywords" content="广联,商户管理" />
<link rel="stylesheet" type="text/css" href="/css/main.css" />
<style>
#app {
padding: 0;
}
.valid-period {
/* width: 560px;
height: 230px; */
text-align: center;
padding: 20px 10px;
background-color: #ffffff;
}
.valid-period .layui-form-radio {
padding-right: 0;
margin-right: 0;
}
.access-form {
margin-top: 20px;
}
.layui-form-label {
position: relative;
}
.layui-form-label.required::before {
position: absolute;
left: 12px;
top: 55%;
transform: translateY(-50%);
}
.layui-form-item {
margin-bottom: 0;
}
.layui-word-text {
line-height: 32px;
}
.layui-tips-text {
display: inline-block;
color: #999;
line-height: 28px;
margin: 6px 10px 0 0;
vertical-align: middle;
}
.form-tips {
color: #F56C6C;
font-size: 12px;
}
.hide {
display: none;
}
.valid-period {
text-align: left;
border-bottom: 1px solid #E6E6E6;
}
</style>
<title>接入模式</title>
</head>
<body>
<div id="app">
<main class="valid-period">
<form class="layui-form access-form" lay-filter="accessModeFilter">
<div class="layui-form-item">
<label class="layui-form-label">商户名称:</label>
<div class="layui-input-block">
<div class="layui-word-text" id="merchantName"></div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label required">接入模式:</label>
<div class="layui-input-block">
<div>
<input type="radio" name="accessMode" lay-filter="radio" value="3" title="应用代开发模式">
<span class="layui-tips-text">(SCRM非独立部署)</span>
</div>
<div>
<input type="radio" name="accessMode" lay-filter="radio" value="0" title="自建应用模式">
<span class="layui-tips-text">(SCRM需独立部署,且生成独立接口域名)</span>
</div>
<div id="modeError" class="form-tips hide">请选择企微接入模式</div>
</div>
</div>
<button id="accessModeBtn" lay-submit lay-filter="accessMode" style="display: none"></button>
</form>
</main>
</div>
<script src="https://img02.glsx.com.cn/layui/layui.js"></script>
<script src="/js/load.js"></script>
<script>
layui.use(['form', 'helper', 'request', 'laydate'], function () {
var form = layui.form
var request = layui.request
var $ = layui.$
var helper = layui.helper
var currLayerIdx = parent.layer.getFrameIndex(window.name)
var merchantInfo = {
id: qs('id'),
merchantName: decodeURI(qs('merchantName'))
}
var merchantName = $('#merchantName')
merchantName.html(merchantInfo.merchantName)
var modeError = $('#modeError')
form.on('submit(accessMode)', function (data) {
if (!data.field.accessMode) {
modeError.removeClass('hide')
return false
}
request({
id: merchantInfo.id,
accessMode: data.field.accessMode,
method: 'merchants.api.merchant.updateAccessMode'
}, function (res) {
if (res.code == '0' && res.data) {
helper.store.set('isRefresh', true)
parent.layer.close(currLayerIdx)
}
})
return false
})
form.on('radio(radio)', function (data) {
modeError.addClass('hide')
})
})
</script>
</body>
</html>
\ No newline at end of file \ No newline at end of file
This diff could not be displayed because it is too large.
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8" />
<meta content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="广联帐户管理中心-员工管理" />
<meta name="author" content="GLSX Web Team" />
<meta name="keywords" itemprop="keywords" content="广联,帐户管理,员工管理" />
<link rel="stylesheet" type="text/css" href="/css/main.css" />
<title>角色管理</title>
</head>
<style>
.sub-bg-white {
background-color: #f4f5fa;
padding-top: 8px;
/* height: 100%; */
padding-bottom: 100px;
}
.tabmutiple-content-wrap {
background-color: #f4f6fc;
padding: 0 0 1px;
margin: 0 20px;
}
.tabmutiple-content {
margin: 0 10px;
background-color: #f4f6fc;
}
.layui-tab-content {
background-color: #fff;
}
.layui-tab-title {
background-color: #f4f6fc;
}
.outtitle {
margin-left: -10px;
}
.layui-this {
background-color: #fff;
border: 2px solid #fff;
}
.layui-tab-title .layui-this {
transform: none;
}
.layui-tab-card>.layui-tab-title li {
margin-left: 0;
}
.topwrap {
margin: 0 20px 0;
background-color: #fff;
position: relative;
}
.topwrap .grayLine {
position: absolute;
left: 0;
top: 48px;
background-color: #d8d8d8;
width: 100%;
height: 1px;
}
.bottomwrap {
margin: 20px 20px 0;
background-color: #fff;
/* height: 100%; */
padding-bottom: 30px;
}
.show {
display: inline-block;
}
.hide {
display: none;
}
</style>
<body>
<div id="app">
<main class="bg-white wrapper detail">
<div class="sub-bg-white">
<div class="topwrap">
<div class="grayLine"></div>
<div class="content-title">
<span>角色基本信息</span>
<div class="title-right" id="merchantName"></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">角色名称:</label>
<div class="layui-input-block">
<div class="layui-form-mid layui-word-aux" id="roleName"></div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">角色号:</label>
<div class="layui-input-block">
<div class="layui-form-mid layui-word-aux" id="roleCode"></div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">角色说明:</label>
<div class="layui-input-block">
<div class="layui-form-mid layui-word-aux" id="roleDescription"></div>
</div>
</div>
</div>
<div class="bottomwrap">
<h3 class="content-title layui-form">
角色权限
<!-- <select id="accountType" name="accountType" lay-filter="accountSelect">
</select> -->
</h3>
<div class="tabmutiple-content-wrap">
<div class="layui-tab tabmutiple-content" lay-filter="roleAuth">
<ul class="layui-tab-title outtitle"></ul>
<div class="layui-tab-content"></div>
</div>
</div>
</div>
<div class="footer-close">
<button type="button" class="layui-btn layui-btn-normal btn-one" id="return">关闭</button>
</div>
</div>
</main>
</div>
<script src="https://img02.glsx.com.cn/layui/layui.js"></script>
<script src="/js/load.js"></script>
<script>
layui.use(['request', 'helper', 'form', 'treeTab'], function () {
var request = layui.request
var helper = layui.helper
var form = layui.form
var xmSelect = layui.xmSelect
var $ = layui.$
var treeTab = layui.treeTab
var roleid = qs('id')
var merchantId = qs('merchantId')
var basicArr = ['roleName', 'roleCode', 'roleDescription', 'merchantName']
var roleData = {}
var menuFunTreeData = []
var templateData = {}
var treeData = {}
// 查询角色详情
getById()
findMenuFunTreeByRoleId()
$('#return').on('click', function () {
window.history.back()
})
function getById() {
var params = { id: roleid, method: 'merchants.api.role.getById' }
request(params, function (res) {
if (res.code == '0') {
roleData = helper.clone(true, res.data)
for (var i in basicArr) {
$('#' + [basicArr[i]]).text(roleData[basicArr[i]] || '无')
}
// callback(roleData.responseList)
}
})
}
function findMenuFunTreeByRoleId() {
var params = {
method: 'merchants.api.merchant.findMenuFunTreeByRoleId',
id: roleid
}
request(params, function (res) {
if (res.code == '0' && res.data && res.data.length != 0) {
var authList = res.data
$.each(authList, function (index, item) {
treeTab.tabAdd(
{
title: item.accounttypeName,
value: item.accounttypeId
},
true
)
var menuData = []
if (item.products && item.products.length != 0) {
$.each(item.products, function (idx, m) {
treeTab.treeTabDetail(
{
name: m.productName,
value: m.productId
},
item.accounttypeId,
m.merchantProTreeResponses
)
})
var filterName = 'treeTab' + item.accounttypeId
var productId = 'tab_' + item.accounttypeId + '_' + item.products[0].productId
treeTab.tabChange(filterName, productId)
}
})
treeTab.tabChange('roleAuth', authList[0].accounttypeId)
$(window).resize();
}
})
}
})
</script>
<!-- <script type="text/html" id="treeAuth">
<ul id="tree_{{d.id}}" class="ztree wrapper-tree"></ul>
<div class="layui-no-data show" id="nomenu{{d.id}}">
<div class="no-data">
<img src="../../css/img/no-data.png" />
<div>暂无菜单数据</div>
</div>
</div>
</div>
</script> -->
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!--
* @Author: your name
* @Date: 2022-01-20 19:40:58
* @LastEditTime: 2022-01-26 11:15:21
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \account\html\role\tree.html
-->
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8" />
<meta content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="修改有效期" />
<meta name="author" content="GLSX Web Team" />
<meta name="keywords" itemprop="keywords" content="广联,商户管理" />
<link rel="stylesheet" type="text/css" href="/css/main.css" />
<style>
.valid-period {
text-align: center;
padding: 20px 20px;
background-color: #ffffff;
}
</style>
<title>tree</title>
</head>
<body>
<div id="app">
<main>fdasfda</main>
</div>
<script src="https://img02.glsx.com.cn/layui/layui.js"></script>
<script src="/js/load.js"></script>
<script>
</script>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="description" content="广联帐户管理中心" />
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
<title>广联帐户管理中心</title>
</head>
<body></body>
<script>
location.href = '/login.html'
</script>
</html>
/*
* @Description: 省市组件
* @Author: huyue
* @Date: 2022-04-08 17:00:25
* @LastEditors: huyue
* @LastEditTime: 2022-04-11 17:01:39
*/
layui.define(['form', 'laydate', 'carousel', 'util'], function (exports) {
const { form, laydate, carousel, util, $, cache } = layui
exports('common', {
/**
* 生成下拉选
* @param config:参数
* id:dom的id
* string:单个dom
* Array:多个dom
* url:获取地址
* value:<option>的value名
* text:<option>text
* getValue:自定义传输值
* getText:自定义显示文本
* param:url请求的额外参数
* initData:默认option
* link:需要联动的下拉选的dom id
* select:选中事件
* @return <option/>文本
*/
getSelect(config) {
let f = {
id: undefined,
url: undefined,
name: '',
value: 'value',
text: 'text',
getValue: function (v) {
return v[this.value]
},
getText: function (t) {
return t[this.text]
},
param: null,
initData: [{ adcode: '', name: '请选择' }],
link: false,
select: false,
data: [],
isFirst: true,
...config
},
that = this,
isArray = Array.isArray(f.id)
if (f.isFirst) {
if (isArray) {
f.id.forEach(id => {
$('#' + id).attr('lay-filter', 'commonSelect' + id)
$('#' + id).attr('name', f.name)
})
} else {
$('#' + f.id).attr('lay-filter', 'commonSelect' + f.id)
$('#' + f.id).attr('name', f.name)
}
}
// getProvinceList()
//绑定选中事件
if (f.select) {
if (isArray) {
f.id.forEach(id => {
form.on('select(commonSelect' + id + ')', function (data) {
f.select(data)
})
})
} else {
form.on('select(commonSelect' + f.id + ')', function (data) {
f.select(data)
})
}
}
//生成option
function getOptions() {
// if (!f.link) {
// f.data = that.provinceInfoList
// }
let h = ''
$.each(f.initData, function (i, d) {
h += '<option value="' + d.adcode + '">' + d.name + '</option>'
})
$.each(f.data, function (i, d) {
h += '<option value="' + f.getValue(d) + '">' + f.getText(d) + '</option>'
})
if (isArray) {
f.id.forEach(d => {
let a = $('#' + d)
a.empty()
a.append(h)
})
} else {
let a = $('#' + f.id)
a.empty()
a.append(h)
}
form.render('select')
return h
}
function getProvinceList() {
var ajax = layui.$.ajax
ajax({
// url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/glsx-oss-account-config',
url: 'http://oss-config.dev.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/provinceList',
async: false,
success: function (res) {
that.provinceInfoList = res.provinceInfoList
}
})
}
return getOptions()
}
})
})
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t="undefined"!=typeof globalThis?globalThis:t||self).GlMap=r()}(this,(function(){"use strict";function t(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}function r(t,r,e,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void e(t)}c.done?r(u):Promise.resolve(u).then(n,o)}function e(t,r,e){return r&&function(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function n(){n=function(){return r};var t,r={},e=Object.prototype,o=e.hasOwnProperty,i=Object.defineProperty||function(t,r,e){t[r]=e.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",f=a.toStringTag||"@@toStringTag";function l(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{l({},"")}catch(t){l=function(t,r,e){return t[r]=e}}function s(t,r,e,n){var o=r&&r.prototype instanceof g?r:g,a=Object.create(o.prototype),c=new P(n||[]);return i(a,"_invoke",{value:O(t,e,c)}),a}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=s;var p="suspendedStart",y="suspendedYield",v="executing",d="completed",m={};function g(){}function w(){}function b(){}var L={};l(L,c,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(T([])));E&&E!==e&&o.call(E,c)&&(L=E);var j=b.prototype=g.prototype=Object.create(L);function G(t){["next","throw","return"].forEach((function(r){l(t,r,(function(t){return this._invoke(r,t)}))}))}function S(t,r){function e(n,i,a,c){var u=h(t[n],t,i);if("throw"!==u.type){var f=u.arg,l=f.value;return l&&"object"==typeof l&&o.call(l,"__await")?r.resolve(l.__await).then((function(t){e("next",t,a,c)}),(function(t){e("throw",t,a,c)})):r.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return e("throw",t,a,c)}))}c(u.arg)}var n;i(this,"_invoke",{value:function(t,o){function i(){return new r((function(r,n){e(t,o,r,n)}))}return n=n?n.then(i,i):i()}})}function O(r,e,n){var o=p;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=_(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var f=h(r,e,n);if("normal"===f.type){if(o=n.done?d:y,f.arg===m)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=d,n.method="throw",n.arg=f.arg)}}}function _(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,_(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,r.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function k(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function A(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function T(r){if(r||""===r){var e=r[c];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var n=-1,i=function e(){for(;++n<r.length;)if(o.call(r,n))return e.value=r[n],e.done=!1,e;return e.value=t,e.done=!0,e};return i.next=i}}throw new TypeError(typeof r+" is not iterable")}return w.prototype=b,i(j,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:w,configurable:!0}),w.displayName=l(b,f,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,f,"GeneratorFunction")),t.prototype=Object.create(j),t},r.awrap=function(t){return{__await:t}},G(S.prototype),l(S.prototype,u,(function(){return this})),r.AsyncIterator=S,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new S(s(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},G(j),l(j,f,"Generator"),l(j,c,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=T,P.prototype={constructor:P,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!r)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function n(n,o){return c.type="throw",c.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),f=o.call(a,"finallyLoc");if(u&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),A(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;A(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:T(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),m}},r}function o(r){return function(r){if(Array.isArray(r))return t(r)}(r)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(r,e){if(r){if("string"==typeof r)return t(r,e);var n={}.toString.call(r).slice(8,-1);return"Object"===n&&r.constructor&&(n=r.constructor.name),"Map"===n||"Set"===n?Array.from(r):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(r,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t){var r=function(t,r){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,r);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof r?r:r+""}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}var c={1:"develop",2:"test",3:"production",4:"beta"},u=function(){return e((function t(){var e=this;!function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,t);var o,i,u={env:3,version:3},f=arguments[0];if(arguments.length>1&&(u="object"==a(arguments[0])?arguments[0]:u,f=arguments[1],null!==(o=u)&&void 0!==o&&o.env||(u.env=3),null!==(i=u)&&void 0!==i&&i.version||(u.version=3)),"undefined"!=typeof window){var l=function(){var t,o=(t=n().mark((function t(){var r,o,i,a;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch("https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=map-api-js&env=".concat(c[u.env]));case 3:return r=t.sent,t.next=6,r.json();case 6:o=t.sent,i=Array.from(document.head.getElementsByTagName("script")).some((function(t){return t.src===o.apiUrl})),i?f&&"function"==typeof f&&(e.GLMap=new window.$GlMapApi(u,(function(){f&&"function"==typeof f&&f(e)}))):((a=document.createElement("script")).src=o.apiUrl,document.head.appendChild(a),a.onload=function(){e.GLMap=new window.$GlMapApi(u,(function(){f&&"function"==typeof f&&f(e)}))}),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(0),console.error("Failed to fetch configuration:",t.t0);case 14:case"end":return t.stop()}}),t,null,[[0,11]])})),function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function c(t){r(a,o,i,c,u,"next",t)}function u(t){r(a,o,i,c,u,"throw",t)}c(void 0)}))});return function(){return o.apply(this,arguments)}}();l()}}),[{key:"invoke",value:function(t){var r,e=Array.prototype.slice.call(arguments,1);return(r=this.GLMap)[t].apply(r,o(e))}},{key:"map",get:function(){return this.GLMap._BMAP}},{key:"mapGL",get:function(){return this.GLMap._BMapGL}}])}();return u}));
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-07-19 16:37:36
* @LastEditors: limin
* @LastEditTime: 2021-08-21 15:10:33
* @FilePath: \account\js\gtree.js
*/
layui.define(['ztree'], function (exports) {
var $ = layui.$
var tree = layui.ztree
var rootNoChildCheckedNode = []
function onNodeCreated(event, treeId, treeNode) {
if (treeNode.logo == 'functionValue') {
var tId = treeNode.getParentNode().tId
var $parentUl = $('#' + tId + '_ul')
if (!$parentUl.hasClass('pr-parent-ul')) {
$parentUl.addClass('pr-parent-ul')
var $switchs = $parentUl.find('li >span.switch')
$switchs.eq(0).removeClass('center_docu').addClass('bottom_docu')
$switchs.not(':eq(0)').addClass('op0')
}
}
if (gtree.opt && gtree.opt.chkDisabled) {
treeNode.chkDisabled = true
}
}
function zTreeOnExpand(event, treeId, treeNode) {
treeNode.check = true
}
var setting = {
view: {
selectedMulti: false,
showIcon: false
},
check: {
enable: true,
chkboxType: {
Y: 'ps',
N: 's'
}
},
data: {
key: {
name: 'label'
}
},
callback: {
onNodeCreated: onNodeCreated,
onExpand: zTreeOnExpand
}
}
var inst = null
var gtree = {
opt: null,
create: function (id, nodes, opt, selfSetting) {
this.opt = opt
var $treeDom = $('#' + id)
$treeDom.addClass('ztree')
if (selfSetting) Object.assign(setting, selfSetting)
inst = tree.init($treeDom, setting, nodes)
inst.expandAll(true)
inst.checkNodes = function (checked) {
var nodesLevel1 = this.getNodes()
var nodesAll = this.transformToArray(nodesLevel1)
for (var i = 0; i <= nodesAll.length; i++) {
var node = nodesAll[i]
if (node && checked.indexOf(node.id) != -1) {
node.checked = true
this.updateNode(node)
}
}
}
return inst
}
}
exports('gtree', gtree)
})
\ No newline at end of file \ No newline at end of file
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-07-21 17:20:56
* @LastEditors: limin
* @LastEditTime: 2021-08-06 16:47:13
* @FilePath: \account\js\helper.js
*/
layui.define(['store'], function (exports) {
/**深度合并对象 */
function clone() {
var extended = {}
var deep = false
var i = 0
// 判断是否为深拷贝
if (Object.prototype.toString.call(arguments[0]) === '[object Boolean]') {
deep = arguments[0]
i++ //如果为深拷贝则初始的i为1或者为0
}
// 将对象属性合并到已存在的对象中
var merge = function (obj) {
for (var prop in obj) {
if (obj.hasOwnProperty(prop)) {
// 如果属性为对象并且需要深拷贝时则使用函数递归、反之则将当前的属性替换现有的属性
if (deep && Object.prototype.toString.call(obj[prop]) === '[object Object]') {
extended[prop] = clone(extended[prop], obj[prop])
} else {
extended[prop] = obj[prop]
}
}
}
}
// 遍历所有对象属性
for (; i < arguments.length; i++) {
merge(arguments[i])
}
return extended
}
function debounce(fun, delay) {
return function (args) {
//获取函数的作用域和变量
var that = this
var _args = args
//每次事件被触发,都会清除当前的timeer,然后重写设置超时调用
clearTimeout(fun.id)
fun.id = setTimeout(function () {
fun.call(that, _args)
}, delay)
}
}
//将后台返回数据中数值为空的字段全部替换为“-”
function formateNullFieldData(initialData) {
const isEmpty = function (val) {
if (!String(val) || String(val) === 'null') {
return '-';
}
return val;
}
if (initialData instanceof Array) {
initialData.forEach(function (val, key, array) {
array[key] = formateNullFieldData(val)
})
} else if (initialData instanceof Object) {
for (let pro in initialData) {
initialData[pro] = formateNullFieldData(initialData[pro])
}
} else {
//数据为基本类型时
initialData = isEmpty(initialData)
}
return initialData;
}
function defaultChecked(treeObj, checkedList) {
var nodesLevel1 = treeObj.getNodes()
var checked = checkedList
var nodesAll = treeObj.transformToArray(nodesLevel1)
for (var i = 0; i <= nodesAll.length; i++) {
var node = nodesAll[i]
if (node && checked.indexOf(node.id) != -1) {
node.checked = true
treeObj.updateNode(node)
}
}
}
// 树 - 模糊搜索 - 找父节点
function findParentNode(node, allNodes, idAttr, parentAttr) {
for (var i = 0; i <= allNodes.length; i++) {
if (allNodes[i][idAttr] == node[parentAttr]) {
return allNodes[i]
}
}
return false
}
// 树 - 模糊搜索 - 找所有节点
/**
* nodesList - 当前筛选出的节点列表
* allNodes - 树的所有节点
* idAttr - 节点的id属性名,默认“tId”
* parentAttr - 节点的父节点属性名,默认“parentTId”
*/
function findShowNode(nodesList, allNodes, idAttr, parentAttr) {
idAttr = idAttr || 'tId'
parentAttr = parentAttr || 'parentTId'
var showNodeList = []
var idx = 0
var addNode = null
var exitNode = {}
while (nodesList.length != idx) {
var curNode = nodesList[idx]
idx = idx + 1
exitNode[curNode[idAttr]] = true
showNodeList.push(curNode)
if (curNode[parentAttr] && !exitNode[curNode[parentAttr]]) {
var parentNode = findParentNode(curNode, allNodes, idAttr, parentAttr)
exitNode[parentNode[idAttr]] = true
nodesList.push(parentNode)
}
}
return showNodeList
}
function dateFormat(time, fmt = 'YYYY-mm-dd') {
var time = new Date(time)
let ret;
const opt = {
"Y+": time.getFullYear().toString(), // 年
"m+": (time.getMonth() + 1).toString(), // 月
"d+": time.getDate().toString(), // 日
"H+": time.getHours().toString(), // 时
"M+": time.getMinutes().toString(), // 分
"S+": time.getSeconds().toString() // 秒
// 有其他格式化字符需求可以继续添加,必须转化成字符串
};
for (let k in opt) {
ret = new RegExp("(" + k + ")").exec(fmt);
if (ret) {
fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
};
};
return fmt;
}
exports('helper', {
clone: clone,
store: layui.store,
debounce: debounce,
formateNullFieldData: formateNullFieldData,
defaultChecked: defaultChecked,
findShowNode: findShowNode,
dateFormat: dateFormat
})
})
\ No newline at end of file \ No newline at end of file
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-07-15 15:46:53
* @LastEditors: huyue
* @LastEditTime: 2023-10-17 15:49:47
* @FilePath: \account\js\load.js
*/
;(function load() {
loadLayConfig()
loadConfig()
loadHeaderFooter()
connect()
})()
/**
* 跳转方法 TODO
*/
function go(module, page, params, blank) {
var _p = !params || layui.$.isEmptyObject(params) ? '' : genurl(params)
var href = '/html/' + module + '/' + page + '.html'
if (blank) {
window.open(href, '_blank')
} else {
window.location.href = _p ? href + '?' + _p : href
}
}
function loadLayConfig() {
layui
.config({
base: '/js/'
})
.extend({
xmSelect: 'xm-select'
})
}
function loadHeaderFooter() {
layui.use(['store'], function () {
var isExternal = isAppend()
var store = layui.store
if (isExternal) {
//运营平台外部系统
append()
} else {
//嵌入运营平台 或者是登录页面
if (qs('sessionId')) {
// SCRM 系统
store.set('accountInfo', {
merchantAccountLevel: qs('accountLevel'),
merchantId: qs('merchantId'),
model: qs('merchantModel') || 1
})
store.set('token', qs('sessionId'))
} else {
// 运营平台
if (isLoginPage()) {
//如果是登陆页面 直接返回 登录成功会设置token
return
}
var t = qs('t') //运营平台子系统从 父系统的iframe src获取 TGT.
if (t) {
store.set('token', t)
}
}
}
})
}
function append() {
var $ = layui.$
var header = document.createElement('header')
var footer = document.createElement('footer')
$(header).load('/html/components/header.html')
$(footer).load('/html/components/footer.html')
$('main').before(header).after(footer)
}
function isAppend() {
return !isLoginPage() && self == top
}
function isLoginPage() {
var _href = location.href.split('/')
var _path = _href.slice(_href.length - 1, _href.length).toString()
return _path.split('?')[0] === 'login.html'
}
function loadConfig() {
layui.use(['store'], function () {
var store = layui.store
if (store.getEx('external', true)) {
return
}
var ajax = layui.$.ajax
ajax({
// url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/glsx-oss-account-config',
url: 'https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=glsx-oss-account-config',
async: false,
success: function (res) {
store.setEx('external', res.external, 10 * 60 * 1000)
}
})
})
}
function goLogin() {
var store = layui.store
if (store.get('accountInfo')) {
$messenger.emit('route-to', { path: '/login' })
} else {
if (!isAppend()) return
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 ''
var params = []
var t = typeof param
if (t == 'string' || t == 'number' || t == 'boolean') {
params.push(key + '=' + (encode == null || encode ? encodeURIComponent(param) : param))
} else {
for (var i in param) {
var k = key == null ? i : key + (param instanceof Array ? '[' + i + ']' : '.' + i)
params.push(genurl(param[i], k, encode))
}
}
return params.join('&')
}
function qs(name) {
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i')
var r = window.location.search.substr(1).match(reg)
if (r != null) {
return decodeURI(r[2])
// return unescape(r[2])
}
return null
}
function connect() {
layui.use(['postmate'], function () {
var Postmate = layui.postmate
new Postmate.Model({
height: () => {
console.log('clientHeight', document.body.clientHeight, 'document.height ', document.height || document.body.offsetHeight)
return document.height || document.body.offsetHeight
},
push: data => {
console.log(data)
}
}).then(parent => (window.$messenger = parent))
})
}
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-07-19 10:15:48
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-03-12 15:50:52
* @FilePath: \account\js\request.js
*/
layui.define(['sha1', 'md5', 'helper'], function (exports) {
var $ = layui.$
var SHA1 = layui.sha1
var md5 = layui.md5
var helper = layui.helper
var store = helper.store
// var loading = null
// var common = {
// secret: '',
// baseURL: 'http://192.168.2.222/router',
// params: {
// appKey: '',
// v: '1.0.0',
// source: 'glsx',
// format: 'json'
// }
// }
var defaultSettings = {
data: {},
type: 'post',
async: true, //false同步方式,true为异步方式
dataType: 'json',
beforeSend: function (request) {
// loading = layer.load(0, {
// shade: false
// }) //0代表加载的风格,支持0-2
var token = store.get('token')
request.setRequestHeader('TGT', token)
},
complete: function () {
// layer.close(loading)
},
error: function (xhr) {
if (xhr.status == 401) {
msg('您未登录')
} else if (xhr.status == 403) {
msg('您没有权限')
} else if (xhr.status == 500) {
msg('服务器发生错误,请稍后刷新页面')
} else {
msg('未知错误')
}
}
}
function request(params, success, config, noSignAttr, isOtherUrl) {
noSignAttr = noSignAttr || []
params = params || {}
params.sessionAuth = 'st'
config = config || {}
var common = store.getEx('external')
var settings = helper.clone(true, defaultSettings)
var data = helper.clone(
true,
{
timestamp: new Date().getTime()
},
common.params,
params
)
if (isOtherUrl) {
data.app_key = data.appKey
delete settings.beforeSend
delete data.appKey
}
data.sign = sign(data, common.secret, noSignAttr, isOtherUrl)
settings.url = isOtherUrl ? common.fileUploadURL + '?method=' + params.method : common.baseURL
settings.data = data
settings.success = function (result) {
if (result.code == '0' || result.returnCode == '0') {
success && success(result)
} else {
msg(result.message)
if (result.errId == '21') {
//TGT失效
goLogin && goLogin()
}
}
}
if (config.async === false) {
settings.async = false
}
if (config.isUpload) {
//如果是图片上传,必须内容
settings.traditional = true
settings.processData = false
settings.contentType = false
}
if (config.isDjUrl) {
settings.url = common.otherRequest + '?method=' + params.method
settings.beforeSend = function (request) {
var token = store.get('token')
request.setRequestHeader('token', token)
}
}
return $.ajax(settings)
}
function sign(params, secret, noSignAttr, isMd5) {
noSignAttr = noSignAttr || []
if (!params || $.isEmptyObject(params)) {
return ''
}
delete params.sign
var arr = []
var secretArr = []
for (var key in params) {
var isPush = false
$.each(noSignAttr, function (index, item) {
if (item == key) {
isPush = true
}
})
if (!isPush) {
arr.push(key)
}
}
arr.sort()
for (var i = 0; i < arr.length; i++) {
var val = arr[i]
secretArr.push(val + params[val])
}
var str = secretArr.join('')
return isMd5 ? md5(secret + str + secret).toUpperCase() : SHA1(secret + str + secret).toUpperCase()
}
function msg(msg) {
layer.msg(msg)
}
exports('request', request)
})
This diff is collapsed. Click to expand it.
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-07-21 14:49:16
* @LastEditors: limin
* @LastEditTime: 2021-07-22 14:27:20
* @FilePath: \account\js\store.js
*/
/*!
* storejs v1.1.0
* Local storage localstorage package provides a simple API
*
* Copyright (c) 2020 kenny wang <wowohoo@qq.com>
* https://github.com/jaywcjlove/store.js
*
* Licensed under the MIT license.
*/
layui.define(function (exports) {
'use strict'
var storage = window.sessionStorage
function isJSON(obj) {
obj = JSON.stringify(obj)
if (!/^\{[\s\S]*\}$/.test(obj)) {
return false
}
return true
}
function stringify(val) {
return val === undefined || typeof val === 'function' ? val + '' : JSON.stringify(val)
}
function deserialize(value) {
if (typeof value !== 'string') {
return undefined
}
try {
return JSON.parse(value)
} catch (e) {
return value
}
}
function isFunction(value) {
return {}.toString.call(value) === '[object Function]'
}
function isArray(value) {
return Object.prototype.toString.call(value) === '[object Array]'
} // https://github.com/jaywcjlove/store.js/pull/8
// Error: QuotaExceededError
function dealIncognito(storage) {
var _KEY = '_Is_Incognit',
_VALUE = 'yes'
try {
storage.setItem(_KEY, _VALUE)
} catch (e) {
if (e.name === 'QuotaExceededError') {
var _nothing = function _nothing() {}
storage.__proto__ = {
setItem: _nothing,
getItem: _nothing,
removeItem: _nothing,
clear: _nothing
}
}
} finally {
if (storage.getItem(_KEY) === _VALUE) storage.removeItem(_KEY)
}
return storage
} // deal QuotaExceededError if user use incognito mode in browser
storage = dealIncognito(storage)
function Store() {
if (!(this instanceof Store)) {
return new Store()
}
}
Store.prototype = {
set: function set(key, val) {
if (key && !isJSON(key)) {
storage.setItem(key, stringify(val))
} else if (isJSON(key)) {
for (var a in key) {
this.set(a, key[a])
}
}
return this
},
get: function get(key) {
if (!key) {
var ret = {}
this.forEach(function (key, val) {
return (ret[key] = val)
})
return ret
}
if (key.charAt(0) === '?') {
return this.has(key.substr(1))
}
var args = arguments
if (args.length > 1) {
var dt = {}
for (var i = 0, len = args.length; i < len; i++) {
var value = deserialize(storage.getItem(args[i]))
if (this.has(args[i])) {
dt[args[i]] = value
}
}
return dt
}
return deserialize(storage.getItem(key))
},
clear: function clear() {
storage.clear()
return this
},
remove: function remove(key) {
var val = this.get(key)
storage.removeItem(key)
return val
},
has: function has(key) {
return {}.hasOwnProperty.call(this.get(), key)
},
keys: function keys() {
var d = []
this.forEach(function (k) {
d.push(k)
})
return d
},
forEach: function forEach(callback) {
for (var i = 0, len = storage.length; i < len; i++) {
var key = storage.key(i)
callback(key, this.get(key))
}
return this
},
search: function search(str) {
var arr = this.keys(),
dt = {}
for (var i = 0, len = arr.length; i < len; i++) {
if (arr[i].indexOf(str) > -1) dt[arr[i]] = this.get(arr[i])
}
return dt
},
setEx: function (key, val, exp) {
exp = exp || 2 * 60 * 60 * 1000
store.set(key, { val: val, exp: exp, time: new Date().getTime() })
},
getEx: function (key, refresh) {
var info = store.get(key)
if (!info) {
return null
}
if (new Date().getTime() - info.time > info.exp) {
store.remove(key)
return null
}
if (refresh) {
info.time = new Date().getTime()
store.set(key, info)
}
return info.val
}
}
var _Store = null
function store(key, data) {
var argm = arguments
var dt = null
if (!_Store) _Store = Store()
if (argm.length === 0) return _Store.get()
if (argm.length === 1) {
if (typeof key === 'string') return _Store.get(key)
if (isJSON(key)) return _Store.set(key)
}
if (argm.length === 2 && typeof key === 'string') {
if (!data) return _Store.remove(key)
if (data && typeof data === 'string') return _Store.set(key, data)
if (data && isFunction(data)) {
dt = null
dt = data(key, _Store.get(key))
store.set(key, dt)
}
}
if (argm.length === 2 && isArray(key) && isFunction(data)) {
for (var i = 0, len = key.length; i < len; i++) {
dt = data(key[i], _Store.get(key[i]))
store.set(key[i], dt)
}
}
return store
}
for (var a in Store.prototype) {
store[a] = Store.prototype[a]
}
exports('store', store)
})
layui.define(['element', 'laytpl', 'gtree', 'xmSelect'], function (exports) {
var element = layui.element
var laytpl = layui.laytpl
var tree = layui.gtree
var xmSelect = layui.xmSelect
var menuFunTreeData = []
var templateData = {}
var treeData = {}
var selectEl = {}
var $ = layui.$
// 树相关的方法
var treeTab = {
/**
* 第一级tab添加
* item: {title: 选项卡名称, value: 选项卡值}
* isDetail:判断是否是详情,不是则显示多选框
* roleAuth: 选项卡过滤器的名称 lay-filter绑定的名字
* content: 一个放置模板的视图容器,用于呈现渲染结果 带有id的div
* id:选项卡标题的lay-id属性值
* 需要引入laytpl gtree element模块,若需要多选框则需引入xmSelect模块
* view 放置模板的视图容器的dom
* templateData:用于渲染模板的数据
* productList:复选下拉框的list,修改过的数据{name: '', value: ''}
* products:对应的菜单下的产品list,包含了对应的权限树,原始数据,需作为参数传入treeTabAdd中,在实例化tree时传入的数据使用
*/
tabAdd: function (item, isDetail) {
var isDetail = isDetail || false
// 渠道的id,一层选项卡的id
var id = item.value
// roleAuth 一层选项卡过滤器的名称
element.tabAdd('roleAuth', {
title: item.title,
// 放置模板视图的上一级div
content: '<div id="role' + id + '"></div>',
// 选项卡标题的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 class="layui-no-data show" id="nodata{{d.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) {
view.innerHTML = html
})
if (!isDetail) {
var productList = []
var products = []
$.each(menuFunTreeData, function (index, item) {
if (item.accounttypeId == id) {
products = item.products
$.each(item.products, function (idx, i) {
productList.push({
name: i.productName,
value: i.productId
})
})
}
})
selectEl[id] = xmSelect.render({
el: '#select' + id,
data: productList,
on: function (data) {
// arr: 当前多选已选中的数据
var arr = data.arr
// change, 此次选择变化的数据,数组
var change = data.change
// isAdd, 此次操作是新增还是删除
var isAdd = data.isAdd
var filterName = 'treeTab' + id
if (isAdd) {
active.treeTabAdd(change[0], id, products)
} else {
var productId = 'tab_' + id + '_' + change[0].value
active.tabDelete(filterName, productId)
}
if (arr.length != 0) {
var productId = 'tab_' + id + '_' + arr[0].value
active.tabChange(filterName, productId)
}
}
})
}
},
// tab删除
tabDelete: function (name, id) {
element.tabDelete(name, id)
},
// tab Change
tabChange: function (name, id) {
element.tabChange(name, id)
if (name == 'roleAuth') {
$(`#nomenu${id}`).html('暂无数据')
} else {
const accounttypeId = id.split('_')[1]
const productId = id.split('_')[2]
$(`#nodata${accounttypeId}`).removeClass('show')
$(`#nodata${accounttypeId}`).addClass('hide')
menuFunTreeData.forEach(item => {
if (item.accounttypeId == accounttypeId) {
item.products.forEach(i => {
if (i.productId == productId) {
if (i.merchantProTreeResponses.length == 0) {
$(`#nomenutab_${accounttypeId}_${productId}`).removeClass('hide')
$(`#nomenutab_${accounttypeId}_${productId}`).addClass('show')
} else {
$(`#nomenutab_${accounttypeId}_${productId}`).removeClass('show')
$(`#nomenutab_${accounttypeId}_${productId}`).addClass('hide')
}
}
})
}
})
}
},
/**
* 第二级选项卡
* treeTabAdd 产品的权限添加
* item: {name: 选项卡名称, value: 选项卡值}
* id 第一级选项卡的item.value
* filterName: 过滤器的名称 lay-filter绑定的值
* treeData:渲染模板的数据,和用来存放对应树实例的对象,
* products:产品list数组
* defaultList:编辑时传入,默认勾选中的数组。(举例:[1,2,3])
*/
treeTabAdd: function (item, id, products, defaultList) {
var productId = 'tab_' + id + '_' + item.value
var filterName = 'treeTab' + id // 过滤器的名称 lay-filter
element.tabAdd(filterName, {
title: item.name,
content: '<div id="treeTab' + productId + '"></div>', // 放置模板视图的div
id: productId
})
var getTreeTpl = `<ul id="tree_{{d.id}}" class="ztree wrapper-tree"></ul>
<div class="layui-no-data show" id="nomenu{{d.id}}">
<div class="no-data">
<img src="../../css/img/no-data.png" />
<div>暂无数据</div>
</div>
</div>
</div>`
treeView = document.getElementById('treeTab' + productId) // 放置模板视图的div
treeData[id] = treeData[id] || {}
treeData[id][item.value] = treeData[id][item.value] || {}
treeData[id][item.value].id = productId // 渲染模版的数据
treeData[id][item.value].productId = item.value
laytpl(getTreeTpl).render(treeData[id][item.value], function (html) {
treeView.innerHTML = html
})
var treeListData = []
$.each(products, function (index, i) {
if (item.value == i.productId) {
treeListData = i.merchantProTreeResponses
}
})
var treedom = 'tree_' + productId
treeData[id][item.value].treeObj = tree.create(treedom, treeListData, { chkDisabled: true })
},
treeTabDetail: function (item, id, productTreeList) {
var productId = 'tab_' + id + '_' + item.value
var filterName = 'treeTab' + id // 过滤器的名称 lay-filter
element.tabAdd(filterName, {
title: item.name,
content: '<div id="treeTab' + productId + '"></div>', // 放置模板视图的div
id: productId
})
var getTreeTpl = `<ul id="tree_{{d.id}}" class="ztree wrapper-tree"></ul>
<div class="layui-no-data show" id="nomenu{{d.id}}">
<div class="no-data">
<img src="../../css/img/no-data.png" />
<div>暂无数据</div>
</div>
</div>
</div>`
treeView = document.getElementById('treeTab' + productId) // 放置模板视图的div
treeData[id] = treeData[id] || {}
treeData[id][item.value] = treeData[id][item.value] || {}
treeData[id][item.value].id = productId // 渲染模版的数据
treeData[id][item.value].productId = item.value
laytpl(getTreeTpl).render(treeData[id][item.value], function (html) {
treeView.innerHTML = html
})
var treedom = 'tree_' + productId
treeData[id][item.value].treeObj = tree.create(treedom, productTreeList, null, {
check: {
enable: false
}
})
if (productTreeList && productTreeList.length != 0) {
$(`#nomenu${productId}`).removeClass('show')
$(`#nomenu${productId}`).addClass('hide')
// } else {
// $(`#nodata${id}`).removeClass('hide')
// $(`#nodata${id}`).addClass('show')
}
}
}
exports('treeTab', treeTab)
})
layui.define(['store'], function (exports) {
var validator = {
/* 手机号码格式校验正则 */
PHONEREG: /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/,
/* 手机号码或固话格式校验正则 */
PHONETWO: /^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/,
/* 同时包含字母和数字 */
ISNUMANDLETTERS: /^[a-zA-Z0-9]+$/,
/* 特殊字符正则 */
SPECIALLETTER: new RegExp("[`~!@#$^&*=|{}':;',\\[\\]<>?~!@#¥……&*——|{}【】‘;:”“'。,、? ]"),
/* 邮箱地址格式正则 */
// EMAILREG:/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/,
EMAILREG: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
/* 判断是否为中文 */
ISCHINESE: /^[\u0391-\uFFE5]+$/,
ISCHINESE2: /[\u4E00-\u9FA5]/,
/* 判断是否为英文字母 */
ISENGLISH: /^[a-zA-Z]+$/,
/* 是否包含空格 */
ISHAVENULL: /^[^\s]*$/,
/* 保留两位小数 */
TWODECIMAL: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
/* 判断是否为正整数 */
ISDECIMAL: /^[0-9]*$/,
/* 6-20位密码 */
PASSWORD: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/,
/**
* 账号管理-手机号码校验
*/
checkPhoneNumber: function (str) {
return validator.PHONEREG.test(str)
},
// 驻店电话校验规则
checkPhoneNumberTwo: function (str) {
return validator.PHONETWO.test(str)
},
// 判断是否含有数字或字母
checkNumOrLetters: function (str) {
return validator.ISNUMANDLETTERS.test(str)
},
// 身份证验证
checkIdCard: function (code) {
var city = {
11: '北京',
12: '天津',
13: '河北',
14: '山西',
15: '内蒙古',
21: '辽宁',
22: '吉林',
23: '黑龙江',
31: '上海',
32: '江苏',
33: '浙江',
34: '安徽',
35: '福建',
36: '江西',
37: '山东',
41: '河南',
42: '湖北',
43: '湖南',
44: '广东',
45: '广西',
46: '海南',
50: '重庆',
51: '四川',
52: '贵州',
53: '云南',
54: '西藏',
61: '陕西',
62: '甘肃',
63: '青海',
64: '宁夏',
65: '新疆',
71: '台湾',
81: '香港',
82: '澳门',
91: '国外 '
}
// var tip = ''
var pass = true
// 身份证位数为15或18位
// if (![15, 18].includes(code.length)) {
if (!(code.length == 15 || code.length == 18)) {
pass = false
} else if (!code || (code.length === 18 && !/^\d{6}(18|19|20)\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|X)$/i.test(code))) {
// tip = '身份证号格式错误'
pass = false
} else if (code.length === 15 && !/^\d{6}\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}$/i.test(code)) {
pass = false
} else if (!city[code.substr(0, 2)]) {
// tip = '地址编码错误'
pass = false
} else {
// 18位身份证需要验证最后一位校验位
if (code.length === 18) {
code = code.split('')
// ∑(ai×Wi)(mod 11)
// 加权因子
var factor = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2]
// 校验位
var parity = [1, 0, 'X', 9, 8, 7, 6, 5, 4, 3, 2]
var sum = 0
var ai = 0
var wi = 0
for (var i = 0; i < 17; i++) {
ai = code[i]
wi = factor[i]
sum += ai * wi
}
// var last = parity[sum % 11]
if (parity[sum % 11] != code[17]) {
// tip = '校验位错误'
pass = false
}
}
}
// if (!pass) alert(tip)
return pass
},
// 密码
checkPassWord: function (value) {
return validator.PASSWORD.test(value)
}
}
exports('validator', validator)
})
This diff could not be displayed because it is too large.
<!--
* @Author: your name
* @Date: 2022-01-20 19:40:58
* @LastEditTime: 2022-01-26 11:14:20
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \account\login.html
-->
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8" />
<meta content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="广联帐户管理中心-员工管理" />
<meta name="author" content="GLSX Web Team" />
<meta name="keywords" itemprop="keywords" content="广联,帐户管理,员工管理" />
<link rel="stylesheet" type="text/css" href="/css/login.css" />
<title>登录</title>
</head>
<body>
<div id="app">
<main>
<div class="bgwrap">
<img src="./css/img/loginBg.png" alt="">
<div class="systemName">
<h2>账户管理中心</h2>
<p>Account Management Center</p>
</div>
</div>
<div class="wrap">
<form class="layui-form" action="">
<div class="title">登 录</div>
<div class="items">
<div class="layui-form-item">
<label class="layui-form-label accountName">帐户名:</label>
<div class="layui-input-inline">
<input type="text" name="userName" required lay-verify="required" placeholder="请输入帐户名"
autocomplete="off" class="layui-input" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label pwd">密&nbsp;&nbsp;&nbsp;&nbsp;码:</label>
<div class="layui-input-inline">
<input type="password" name="password" required lay-verify="required" placeholder="请输入密码"
autocomplete="off" class="layui-input" />
</div>
</div>
<!-- <div class="layui-form-item">
<label class="layui-form-label">验证码:</label>
<div class="layui-input-inline">
<input type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input" />
</div>
</div> -->
</div>
<div class="layui-form-item">
<div class="layui-input-block btn-login">
<button class="layui-btn layui-input-inline" lay-submit lay-filter="formLogin">登录</button>
</div>
</div>
</form>
</div>
</main>
</div>
<script src="https://img02.glsx.com.cn/layui/layui.js"></script>
<script src="/js/load.js"></script>
<script>
layui.use(['form', 'request', 'helper'], function () {
var form = layui.form
var request = layui.request
var helper = layui.helper
//监听提交
form.on('submit(formLogin)', function (data) {
var params = helper.clone(false, {
method: 'entmicro.api.example.login'
}, data.field)
request(params, function (result) {
if (result.code == '0') {
var sessionId = result.data.sessionId
helper.store.set('token', sessionId)
helper.store.set('user', result.data)
go('merchant', 'index')
}
})
return false
})
})
</script>
</body>
</html>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!