password encrpt
This commit is contained in:
parent
1a987130cc
commit
e63749c8ed
|
@ -10,6 +10,7 @@ mysite/__pycache__/
|
|||
media/
|
||||
aspnet_client/
|
||||
static/
|
||||
mysite/settings.py
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
|
|
|
@ -643,12 +643,13 @@ def exportxlsx(a,objs):
|
|||
sheet = wb.active
|
||||
for i, x in enumerate(objs):
|
||||
num = str(i+3)
|
||||
sheet['a'+num] = x.name
|
||||
sheet['b'+num] = x.catename
|
||||
sheet['c'+num] = x.type
|
||||
sheet['d'+num] = x.area.name
|
||||
sheet['e'+num] = '正常' if x.state==1 else '异常'
|
||||
sheet['f'+num] = 'https://safeyun.ctcshe.com/miniprogram/equipment?id='+str(x.id)
|
||||
sheet['a'+num] = x.num
|
||||
sheet['b'+num] = x.name
|
||||
sheet['c'+num] = x.cate.dickeyname
|
||||
sheet['d'+num] = x.type
|
||||
sheet['e'+num] = x.area.name
|
||||
sheet['f'+num] = '正常' if x.state==1 else '异常'
|
||||
sheet['g'+num] = 'https://safeyun.ctcshe.com/miniprogram/equipment?id='+str(x.id)
|
||||
nowtime = datetime.now().strftime('%Y%m%d%H%M%S')
|
||||
sheet['b1'] = nowtime
|
||||
filename = 'SBS' + nowtime
|
||||
|
|
Binary file not shown.
|
@ -28,12 +28,11 @@
|
|||
<script src="https://cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.js"></script>
|
||||
<script type="text/javascript" src="/static/safesite/mystatic/js/util.js"></script>
|
||||
<style type="text/css">
|
||||
.easyui-linkbutton:hover
|
||||
|
||||
{
|
||||
.easyui-linkbutton:hover {
|
||||
background: #1148a0;
|
||||
color: #0E2D5F;
|
||||
}
|
||||
|
||||
.loading {
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
|
@ -45,14 +44,16 @@
|
|||
text-align: left;
|
||||
padding: 5px 10px
|
||||
}
|
||||
|
||||
.northDiv {
|
||||
overflow: hidden;
|
||||
height: 80px;
|
||||
background-color: #013162;
|
||||
background-image: url("/static/safesite/mystatic/images/indexbj1.png");
|
||||
background-repeat: no-repeat;
|
||||
font-family: Verdana, 微软雅黑,黑体
|
||||
font-family: Verdana, 微软雅黑, 黑体
|
||||
}
|
||||
|
||||
.divMune {
|
||||
height: 35px;
|
||||
background-color: #f9f9f9;
|
||||
|
@ -76,7 +77,8 @@
|
|||
</div>
|
||||
<div region="north" class="northDiv">
|
||||
<div style="float:right;width:7%;margin-left:10px">
|
||||
<img src="/static/safesite/mystatic/images/head.png" style="float: right;width:50px;height:50px;text-align: center;margin-top: 10px;margin-right: 10px;"
|
||||
<img src="/static/safesite/mystatic/images/head.png"
|
||||
style="float: right;width:50px;height:50px;text-align: center;margin-top: 10px;margin-right: 10px;"
|
||||
id="headimg" />
|
||||
</div>
|
||||
<div style="width:30%;float:right">
|
||||
|
@ -88,13 +90,14 @@
|
|||
<div style="text-align: center;position: fixed;width: 500px;height: 70px;top: 40px;right: 60px;">
|
||||
<a style="color: #eee5e7;cursor: pointer;" class="easyui-linkbutton" iconCls="fa-sign-out" plain=true
|
||||
onclick="logout()">安全退出</a>
|
||||
<a style="color: #eee5e7;cursor: pointer;" id="bindwx" class="easyui-linkbutton" iconCls="fa-weixin" plain=true
|
||||
onclick="bindwx()">绑定微信</a>
|
||||
<a style="color: #eee5e7;cursor: pointer;" id="bindwx" class="easyui-linkbutton" iconCls="fa-weixin"
|
||||
plain=true onclick="bindwx()">绑定微信</a>
|
||||
<a style="color: #eee5e7;cursor: pointer;" class="easyui-linkbutton" iconCls="fa-key" plain=true
|
||||
onclick="javascript:$('#pwdg').dialog({border:false})">修改密码</a>
|
||||
<a id='setupb' class="easyui-linkbutton" iconCls="fa-cogs" plain=true style="display:none;color: #eee5e7;cursor: pointer;"
|
||||
onclick="setup()">预警设置</a>
|
||||
<a style="color: #eee5e7;cursor: pointer;" href="datashow" target="_blank" class="easyui-linkbutton" iconCls="fa-desktop" plain=true>数据大屏</a>
|
||||
<a id='setupb' class="easyui-linkbutton" iconCls="fa-cogs" plain=true
|
||||
style="display:none;color: #eee5e7;cursor: pointer;" onclick="setup()">预警设置</a>
|
||||
<a style="color: #eee5e7;cursor: pointer;" href="datashow" target="_blank" class="easyui-linkbutton"
|
||||
iconCls="fa-desktop" plain=true>数据大屏</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -102,14 +105,18 @@
|
|||
<input id="userindex" userid="{{userid}}" openid="{{openid}}" nickname="{{nickname}}"
|
||||
headimgurl="{{headimgurl}}" menus="{{menus}}" style="display:none;" />
|
||||
|
||||
<button style="margin: 15px;background-color: transparent;border: 0;color: white;cursor: pointer;" onclick="javascript:$('#main').panel({href:'mainhtml',title:'主页'})"><span style="font-size:24px">{{companyname}}</span><br/><span style="font-size:20px">安全生产管理系统</span></button>
|
||||
<button style="margin: 15px;background-color: transparent;border: 0;color: white;cursor: pointer;"
|
||||
onclick="javascript:$('#main').panel({href:'mainhtml',title:'主页'})"><span
|
||||
style="font-size:24px">{{companyname}}</span><br /><span
|
||||
style="font-size:20px">安全生产管理系统</span></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="menuTreediv" data-options="region:'west'" style="width: 150px; background-color: #ffffff;">
|
||||
<div class="divMune">
|
||||
<img src="/static/safesite/mystatic/images/fanhuiBut.png" style="float: right;width:20px;height:20px;text-align: center;margin-top: 10px;margin-right: 10px;"
|
||||
<img src="/static/safesite/mystatic/images/fanhuiBut.png"
|
||||
style="float: right;width:20px;height:20px;text-align: center;margin-top: 10px;margin-right: 10px;"
|
||||
id="headimg" />
|
||||
<a onclick="javascript:$('#main').panel({href:'mainhtml',title:'主页'})">返回主页</a>
|
||||
</div>
|
||||
|
@ -198,7 +205,11 @@
|
|||
var v = $("#oldpwd").val();
|
||||
var v1 = $("#newpwd").val();
|
||||
var v2 = $("#newpwd2").val();
|
||||
if (v1 == v2) {
|
||||
var regex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z]).{8,30}');
|
||||
if (!regex.test(v1)||!regex.test(v2)) {
|
||||
$.messager.alert("提示信息", "您的密码复杂度太低(密码中必须包含字母、数字)", "error");
|
||||
}
|
||||
else if (v1 == v2) {
|
||||
$.post(
|
||||
"changepwd",
|
||||
{ "oldpassword": v, "newpassword": v1 },
|
||||
|
@ -221,7 +232,7 @@
|
|||
}
|
||||
|
||||
function setup() {
|
||||
opendg('预警相关设置','setup?a=setuph')
|
||||
opendg('预警相关设置', 'setup?a=setuph')
|
||||
}
|
||||
/*
|
||||
* 关闭遮罩层
|
||||
|
@ -252,8 +263,8 @@
|
|||
},
|
||||
});
|
||||
})
|
||||
$.get('api/rights?a=have',function(res){
|
||||
localStorage.setItem('data',JSON.stringify(res));
|
||||
$.get('api/rights?a=have', function (res) {
|
||||
localStorage.setItem('data', JSON.stringify(res));
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
@ -2219,8 +2219,10 @@ def getuser(req):
|
|||
if req.GET.get('a')=='datagrid':
|
||||
a = User.objects.filter(ubelongpart__in=parts,deletemark=1).exclude(issuper=1)
|
||||
total = a.count()
|
||||
if req.GET.get('page',None):
|
||||
startnum,endnum = fenye(req)
|
||||
a = a[startnum:endnum].values('userid','empid','name','ubelongpart__partname','ubelongpart__partid','username','openid')
|
||||
a = a[startnum:endnum]
|
||||
a = a.values('userid','empid','name','ubelongpart__partname','ubelongpart__partid','username','openid')
|
||||
return HttpResponse(transjson(total,a),content_type="application/json")
|
||||
else:
|
||||
a = User.objects.filter(ubelongpart__in=parts,deletemark=1).exclude(issuper=1).values('userid','name')
|
||||
|
@ -3149,7 +3151,7 @@ def apicompany(req):
|
|||
x = User()
|
||||
x.username = admin
|
||||
x.name = '超级管理员'
|
||||
x.password = '0000'
|
||||
x.password = 'Aq123456'
|
||||
x.issuper = 1
|
||||
x.ubelongpart = y
|
||||
x.usecomp = y
|
||||
|
|
Loading…
Reference in New Issue