From e34c90934c2243097d00110fd685ee41849fce1b Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 17 Oct 2019 19:53:44 +0800 Subject: [PATCH 1/6] groups login --- groups/templates/groups/login.html | 168 ++++++++++++++++++--------- groups/templates/groups/login33.html | 62 ++++++++++ groups/views.py | 1 - 3 files changed, 173 insertions(+), 58 deletions(-) create mode 100644 groups/templates/groups/login33.html diff --git a/groups/templates/groups/login.html b/groups/templates/groups/login.html index 6b9a44a9..6d12ef52 100644 --- a/groups/templates/groups/login.html +++ b/groups/templates/groups/login.html @@ -1,62 +1,116 @@ -{% load static %} - - - - - - - - - - - 登录 - - -
-
- -
-
+ + - - - - - + + {% load static %} + + + 集团后台|登陆 + + + + + + + + + + + + - - - + + + + + \ No newline at end of file + + + + \ No newline at end of file diff --git a/groups/templates/groups/login33.html b/groups/templates/groups/login33.html new file mode 100644 index 00000000..8ea32f37 --- /dev/null +++ b/groups/templates/groups/login33.html @@ -0,0 +1,62 @@ +{% load static %} + + + + + + + + + + + 登录 + + +
+
+ +
+
+ + + + + + + + + + \ No newline at end of file diff --git a/groups/views.py b/groups/views.py index 6b3f0323..b354a695 100644 --- a/groups/views.py +++ b/groups/views.py @@ -34,7 +34,6 @@ def login(request): request.session['user_name'] = user.username return redirect('/groups/index/') else: - message = '密码不正确!' return render(request, 'groups/login.html', locals()) else: return render(request, 'groups/login.html', locals()) From 1f70f6e47f78ee49f47e101e089c8dcba4ef8145 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Fri, 18 Oct 2019 16:36:15 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E9=A3=8E=E9=99=A9=E5=88=86=E6=9E=90?= =?UTF-8?q?=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- safesite/models.py | 2 +- safesite/templates/riskas.html | 655 +++++++++++++++++++++++++-------- safesite/urls.py | 3 +- safesite/views.py | 74 +++- 4 files changed, 584 insertions(+), 150 deletions(-) diff --git a/safesite/models.py b/safesite/models.py index bf09e322..76efbbe4 100644 --- a/safesite/models.py +++ b/safesite/models.py @@ -693,7 +693,7 @@ class Inspect(models.Model):#设备巡检记录 class RiskAct(models.Model):#风险点表 id = models.AutoField(primary_key=True) - area = models.ForeignKey(Area,on_delete=models.CASCADE,null=True,blank=True) + area = models.ForeignKey(Area,on_delete=models.CASCADE,null=True,blank=True,related_name='riskactarea') place = models.CharField(max_length=50,null=True,blank=True) type = models.ForeignKey(Dickey,on_delete=models.CASCADE,null=True,blank=True) name = models.CharField(max_length=200,null=True,blank=True) diff --git a/safesite/templates/riskas.html b/safesite/templates/riskas.html index 09f0f186..763fe778 100644 --- a/safesite/templates/riskas.html +++ b/safesite/templates/riskas.html @@ -1,94 +1,27 @@
-
- - - - 查询
+
+ + 查询
-
-
-
+
+
-
-
-
-
+
+
-
-
-
+ +
-
+
-
- - - - - - - - - -
用户ID姓名所属部门填报隐患数
-
-
- 查询 - 导出 -
- - - -
- -
-
-
- - - - - - - - - -
用户ID姓名所属部门整改隐患数
- -
-
- 查询 - 导出 -
- - - -
-
-
-
- - \ No newline at end of file diff --git a/safesite/urls.py b/safesite/urls.py index 4ecde179..263be6e7 100644 --- a/safesite/urls.py +++ b/safesite/urls.py @@ -86,6 +86,7 @@ urlpatterns = [ path('html/risk/edit//',views.riskedit), path('html/report/edit',views.reportedit), path('riskas',views.riskas), + path('html/examhistory//',views.examhistory), #html页面 @@ -149,7 +150,7 @@ urlpatterns = [ #path('api/riskactcheck',views.apiriskactcheck), path('api/riskcheck2',views.apiriskcheck2), path('api/report',views.apireport), - path('html/examhistory//',views.examhistory), + path('api/riskas',views.apiriskas), #path('api/rights/group/',views.rightsgroup), diff --git a/safesite/views.py b/safesite/views.py index 6badac57..220685a4 100644 --- a/safesite/views.py +++ b/safesite/views.py @@ -1646,7 +1646,7 @@ def charthandle(req): nowyjz = a.yjz nowycz = a.ycz return JsonResponse({'code':1,'yjz':nowyjz,'ycz':nowycz}) - elif req.GET.get('a')=='yhlbt':#隐患列表图 + elif req.GET.get('a')=='yhlbt':#隐患类别图 if req.GET.get('year'): year = int(req.GET.get('year')) month = int(req.GET.get('month')) @@ -1952,6 +1952,78 @@ def charthandle(req): value.append({'value':y,'name':x}) return JsonResponse({'code':1,'key':key,'value':value}) +def apiriskas(req): + userid = req.session['userid'] + companyid = getcompany(userid) + if req.GET.get('a') == 'fxdlxt':#风险点类型图 + objs = RiskAct.objects.filter(usecomp__partid=companyid) + if req.GET.get('zrbm',None): + partid = req.GET.get('zrbm') + objs = objs.filter(zrbm__partid=partid) + legendData = [] + seriesData = [] + for i in Dickey.objects.filter(dicparent__dicid=53): + legendData.append(i.dickeyname) + seriesData.append({'value':objs.filter(type=i).count(),'name':i.dickeyname}) + return JsonResponse({'code':1,'legendData':legendData,'seriesData':seriesData}) + elif req.GET.get('a') == 'fxdjbt':#风险点级别图 + objs = RiskAct.objects.filter(usecomp__partid=companyid) + if req.GET.get('zrbm',None): + partid = req.GET.get('zrbm') + objs = objs.filter(zrbm__partid=partid) + legendData = ['低风险','一般风险','较大风险','重大风险'] + seriesData = [] + for i in legendData: + seriesData.append({'value':objs.filter(level=i).count(),'name':i}) + return JsonResponse({'code':1,'legendData':legendData,'seriesData':seriesData}) + elif req.GET.get('a') == 'fxjbt':#风险级别图 + objs = Risk.objects.filter(usecomp__partid=companyid) + if req.GET.get('zrbm',None): + partid = req.GET.get('zrbm') + objs = objs.filter(riskact__zrbm__partid=partid) + legendData = ['低风险','一般风险','较大风险','重大风险'] + seriesData = [] + for i in legendData: + seriesData.append({'value':objs.filter(level=i).count(),'name':i}) + return JsonResponse({'code':1,'legendData':legendData,'seriesData':seriesData}) + elif req.GET.get('a') == 'fxdqyt':#风险点区域图 + objs = RiskAct.objects.filter(usecomp__partid=companyid) + objs2 = Risk.objects.filter(usecomp__partid=companyid) + if req.GET.get('zrbm',None): + partid = req.GET.get('zrbm') + objs = objs.filter(riskact__zrbm__partid=partid) + xAxisData = [] + series = [] + #areas = Area.objects.filter(usecomp__partid=companyid,deletemark=1) + #riskactareas = Area.objects.filter(usecomp__partid=companyid,deletemark=1).annotate(num=Count('riskactarea')).filter(num__gt=0).order_by('-num') + riskactareas = objs.values('area').annotate(num=Count('area')).order_by('-num') + for i in riskactareas: + xAxisData.append(Area.objects.get(id=i['area']).name) + data = {} + data['datariskact']=[] # 风险点总数 + data['datariskact1']=[] # 低风险点数 + data['datariskact2']=[] # 一般风险点数 + data['datariskact3']=[] # 较大风险点数 + data['datariskact4']=[] # 重大风险点数 + data['datarisk']=[] # 风险总数 + data['datarisk1']=[] # 低风险数 + data['datarisk2']=[] # 一般风险数 + data['datarisk3']=[] # 较大风险数 + data['datarisk4']=[] # 重大风险数 + for i in riskactareas: + objsxx = objs.filter(area__id=i['area']) + data['datariskact'].append(objsxx.count()) + data['datariskact1'].append(objsxx.filter(level="低风险").count()) + data['datariskact2'].append(objsxx.filter(level="一般风险").count()) + data['datariskact3'].append(objsxx.filter(level="较大风险").count()) + data['datariskact4'].append(objsxx.filter(level="重大风险").count()) + objsxx2 = objs2.filter(riskact__area__id=i['area']) + data['datarisk'].append(objsxx2.count()) + data['datarisk1'].append(objsxx2.filter(level="低风险").count()) + data['datarisk2'].append(objsxx2.filter(level="一般风险").count()) + data['datarisk3'].append(objsxx2.filter(level="较大风险").count()) + data['datarisk4'].append(objsxx2.filter(level="重大风险").count()) + return JsonResponse({'code':1,'xAxisData':xAxisData,'seriesData':data}) def fxhandle(req): a = req.GET.get('a') if a == 'exportyjdoc': From b698651baaa6c89ef1021aced28b380f2868612f Mon Sep 17 00:00:00 2001 From: shilixia <2309368887@qq.com> Date: Fri, 18 Oct 2019 16:37:19 +0800 Subject: [PATCH 3/6] xingweitongji --- .../static/safesite/easyui/themes/icon.css | 4 +- .../safesite/easyui/themes/icons/behv.png | Bin 0 -> 1066 bytes safesite/templates/behavior.html | 312 ++++++++++++++++++ safesite/urls.py | 4 +- safesite/views.py | 80 ++++- static/safesite/easyui/themes/icons/behv.png | Bin 0 -> 1066 bytes 6 files changed, 396 insertions(+), 4 deletions(-) create mode 100644 safesite/static/safesite/easyui/themes/icons/behv.png create mode 100644 safesite/templates/behavior.html create mode 100644 static/safesite/easyui/themes/icons/behv.png diff --git a/safesite/static/safesite/easyui/themes/icon.css b/safesite/static/safesite/easyui/themes/icon.css index ec677c31..b3d93cc6 100644 --- a/safesite/static/safesite/easyui/themes/icon.css +++ b/safesite/static/safesite/easyui/themes/icon.css @@ -166,7 +166,9 @@ .icon-taskdo{ background:url('icons/taskdo.png') no-repeat center center; } - +.icon-bhr { + background: url('icons/behv.png') no-repeat center center; +} diff --git a/safesite/static/safesite/easyui/themes/icons/behv.png b/safesite/static/safesite/easyui/themes/icons/behv.png new file mode 100644 index 0000000000000000000000000000000000000000..8ce205131966ff32cc66a1dbe1dffc9f88b01ba7 GIT binary patch literal 1066 zcmV+_1l9YAP)q*e8g6f_P34e1dpR5a$G8P7u68nJmI= zB)>O{!5gpzsPd|%7A;v4diI;q3R>!}Usb<;RTC;coz<_uacK1cJ^-UjL|xg+%u^7i z0FB8CM_&Ewr;10aI<7I#}uR?W9yIswqCc<>Cw!+HJod`8pRwmpRaI;&p>2x}iU zhWQGN%h19Ibxg0xoyy@q1wS9usMaE;0T=@!JdcgeV6Bh6`d^o2AaVh;gWh`r#A`74 zPbQpQH{8)SZ{+>n(&-c9j6koV{TTZ81m)g0_bTGhy*~K^N-4N;={)p*PtR0 z^)KqbwSJxDgaV-0zTEw;egdbyJsCbE?0U~0J6%mu#f!i>vOq%U*}SpXH>*Pd=-fGH zAbJPzm1nyL4>c}^ttE-KEzt+Iaj1c`181a&$^5&wrv z44nJ+MAd%L(+PSKUX`LeuA~9*RoKA5V)xr zJZ~%xcbB_IqI$xkg}pc^YeJo%m$D}j*a|>&VmD}hkrphuUo;jMPnJzlxECp~IYM)v zs2Kq5yWUhfSXm14bRrfnDc|I&nnttYwvy14(kxLsfisJAK6e&z<+qQtGZ;u>W#$8`>iUPTZRU?#-2TSsSi)L(|iE3st1xP&8vOqd{?8K!IfBw zqfnY5+_dJ{f5s<&XEMmEkSc2%o#2~!0SCDn`=Jo0V#P!5bp7BO8&!#4Nx#HEUH z`KBE>pH({Zno(>_CfldkDM*l432zyYO*+%w%bx#yAW2Dh(LiDlFCNJ-3yEJp*7LZ8 zr3K5NliTd_hSH>`Gr|+!{(4?D&&4IG-YD75%5>3Kt|Or~hQy~;qY;ng@3el1=LGJ@ zvV9N4mWzoc(NIbkUBT#*i7(B8M8+_z@Z19WkjqItFUVvKD?E}R)U2p%B(`78g60WG zE-4$yEl&yGfH9ogw?i}BMIcH6n1)0#IjqH(Q|js~m}mru + var now = new Date(); + $(function () { + year = now.getFullYear(); + month = now.getMonth() + 1; + for (var i = 0; i < 5; i++) { + $('#year').append(''); + } + $.get('api/tool?a=servertime', function (res) { + $('#year').combobox().combobox('setValue', res.year); + $('#month').combobox().combobox('setValue', res.month); + behaviorDate(); + }) + + }); + $("#sfxbm2").combotree({ + url: 'parthandle?a=tree', + editable: false, + loadFilter: function (rows) { + return convert(rows); + }, + formatter: function (node) { + var s = node.text; + if (node.children) { + s += ' (' + node.children.length + ')'; + } + return s; + }, + onSelect: function (node) { + $('#sfxr').combobox({ + url: 'getuser?partid=' + node.id + '&a=combobox', + editable: false, + }); + } + }); + function gcpmsearch() { + var querydata = $('#fxrpms').serializeJSON(); + $('#fxrpmtable').datagrid('load', querydata); + } + function gcpmexport() { + var data = $('#fxrpmtable').datagrid('getData'); + var datalist = data.rows; + + for (var j = 0, len = datalist.length; j < len; j++) { + var dic = datalist[j] + for (var key in dic) { + dic["观察人"] = dic["looker__name"] + dic["观察部门"] = dic["lookpart__partname"] + dic["行为观察数"] = dic["number"] + delete dic["looker__userid"]; + delete dic["looker__name"] + delete dic["lookpart__partname"] + delete dic["number"] + } + } + JSONToCSVConvertor(JSON.stringify(datalist), "观察行为排名", true); + } + function behaviorDate() + { + var y = $("#year").val(); + var m = $("#month").val(); + var gcChart = echarts.init(document.getElementById("piecontainer")); + + gcChart.setOption(option = { + title: { + text: '观察类型分布', + x: 'left' + }, + tooltip: { + trigger: 'item', + formatter: "{a}
{b} : {c} ({d}%)" + }, + legend: { + orient: 'vertical', + x: 'left', + y: 'bottom', + data: [] + }, + toolbox: { + show: true, + feature: { + mark: { show: true }, + dataView: { show: true, readOnly: false }, + restore: { show: true }, + saveAsImage: { show: true } + } + }, + calculable: true, + series: [ + { + name: '级别分布', + type: 'pie', + radius: '55%', + roseType: 'angle', + center: ['50%', '60%'], + itemStyle: { + normal: { + label: { + show: false + }, + labelLine: { + show: false + } + }, + emphasis: { + label: { + show: true, + position: 'center', + textStyle: { + fontSize: '22', + fontWeight: 'bold' + } + } + } + }, + data: [] + } + ] + }); + gcChart.showLoading(); + $.ajax({ + type: "get", + async: true, //异步请求(同步请求将会锁住浏览器,用户其他操作必须等待请求完成才可以执行) + url: "api/obscount?a=gclxt&year=" + y + "&month=" + m, //请求发送 + dataType: "json", //返回数据形式为json + success: function (data) { + //请求成功时执行该函数内容,data即为服务器返回的json对象 + + if (data) { + gcChart.hideLoading(); //隐藏加载动画 + gcChart.setOption({ + legend: { data: data.key }, + series: { + name: '级别分布', + data: data.value, + } + } + ); + + } + }, + error: function (errorMsg) { + gcChart.hideLoading(); + } + }); + + } + + + function funTypeChange() { + behaviorDate();//饼图 + } + + var y = now.getFullYear(); + //行为观察折线图 + $.ajax({ + type: "get", + async: true, //异步请求(同步请求将会锁住浏览器,用户其他操作必须等待请求完成才可以执行) + url: "api/obscount?a=gclzx&year=" + y, //请求发送 + dataType: "json", //返回数据形式为json + success: function (data) { + //请求成功时执行该函数内容,data即为服务器返回的json对象 + + var gcChart2 = echarts.init(document.getElementById("piecontainer2")); + gcChart2.hideLoading(); + gcChart2.setOption(option = { + title: { + text: '行为观察折线图' + }, + tooltip: { + trigger: 'axis' + }, + legend: { + data: ['人员的反映', '员工的位置', '个人防护装备', '工具和设备', '程序和标准','人体工程学','环境整洁'] + }, + grid: { + left: '3%', + right: '4%', + bottom: '3%', + containLabel: true + }, + toolbox: { + feature: { + saveAsImage: {} + } + }, + xAxis: { + type: 'category', + boundaryGap: false, + data: data.months + }, + yAxis: { + type: 'value' + }, + series: [ + { + name: '人员的反映', + type: 'line', + stack: '总量', + data: data.userfy + }, + { + name: '员工的位置', + type: 'line', + stack: '总量', + data: data.userwz + }, + { + name: '个人防护装备', + type: 'line', + stack: '总量', + data: data.grfh + }, + { + name: '工具和设备', + type: 'line', + stack: '总量', + data: data.gjhsb + }, + { + name: '程序和标准', + type: 'line', + stack: '总量', + data: data.cxhbz + } + , + { + name: '人体工程学', + type: 'line', + stack: '总量', + data: data.rtgcx + }, + { + name: '环境整洁', + type: 'line', + stack: '总量', + data: data.hjzj + } + ] + }); + }, + error: function (errorMsg) { + gcChart2.hideLoading(); + } + }); + + + + +
+ + +
+ +
+
+
+ + + + +
+ +
+
+
+ + + + + + + + + + +
用户ID观察人姓名观察部门行为观察数
+
+
+ 查询 + 导出 +
+ + + +
+ +
+
+ + + +
+
+
+ + + \ No newline at end of file diff --git a/safesite/urls.py b/safesite/urls.py index cb895384..358858c4 100644 --- a/safesite/urls.py +++ b/safesite/urls.py @@ -85,6 +85,8 @@ urlpatterns = [ path('html/riskcheck',views.riskcheck), path('html/risk/edit//',views.riskedit), path('html/report/edit',views.reportedit), + path('html/bhr',views.bhrhtml), + #html页面 @@ -149,7 +151,7 @@ urlpatterns = [ path('api/riskcheck2',views.apiriskcheck2), path('api/report',views.apireport), path('html/examhistory//',views.examhistory), - + path('api/obscount',views.observepic), #path('api/rights/group/',views.rightsgroup), path('api/main',views.mainapi), diff --git a/safesite/views.py b/safesite/views.py index 5cbc6980..623f1da6 100644 --- a/safesite/views.py +++ b/safesite/views.py @@ -234,7 +234,8 @@ def troubleashtml(req): return render(req,'troubleashtml.html') def userhtml(req): return render(req,'userhtml.html') - +def bhrhtml(req): + return render(req,'behavior.html') def check_login(func): def warpper(request,*args,**kwargs): is_login = request.session.get('userid', None) @@ -2714,10 +2715,85 @@ def gchandle(req): url = exportdoc2('gc',data) return JsonResponse({"code":1,"downloadurl":url}) +def observepic(req): + userid = req.session['userid'] + companyid = getcompany(userid) + if req.GET.get('a')=='gclxt':#观察类型饼图 + year = int(req.GET.get('year')) + month = int(req.GET.get('month')) + first_day,first_day_of_next_month = gettime(datetime(year,month,1)) + if req.GET.get('part'): + partid = req.GET.get('part') + else: + partid = companyid + parts = Partment.objects.filter(Q(partid=partid) | Q(partlink__contains=',' + str(partid) + ',')) + a = Observe.objects.filter(lookpart__in=parts,deletemark=1,looktime__range=(first_day, first_day_of_next_month)) + value=[] + key=[] + for i in Dicclass.objects.filter(parentid__dicid=23): + x = i.dicname + y = Unsafes.objects.filter(observe__in=a,unsafedicclass=i).count() + key.append(x) + value.append({'value':y,'name':x}) + return JsonResponse({'code':1,'key':key,'value':value}) + elif req.GET.get('a')=='gclzx':#观察类型折线图 + year = int(req.GET.get('year')) + months = [1,2,3,4,5,6,7,8,9,10,11,12] + userfy=[]#人员反映 + userwz=[]#员工的位置 + grfh=[]#个人防护装备 + gjhsb=[]#工具和设备 + cxhbz=[]#程序和标准 + rtgcx=[]#人体工程学 + hjzj=[]#环境整洁 + for month in months: + first_day,first_day_of_next_month = gettime(datetime(year,month,1)) + if req.GET.get('part'): + partid = req.GET.get('part') + else: + partid = companyid + parts = Partment.objects.filter(Q(partid=partid) | Q(partlink__contains=',' + str(partid) + ',')) + a = Observe.objects.filter(lookpart__in=parts,deletemark=1,looktime__range=(first_day, first_day_of_next_month)) + for i in Dicclass.objects.filter(parentid__dicid=23): + if i.dicid==24: + userfy.append(Unsafes.objects.filter(observe__in=a,unsafedicclass=i).count()) + elif i.dicid==25: + userwz.append(Unsafes.objects.filter(observe__in=a,unsafedicclass=i).count()) + elif i.dicid==26: + grfh.append(Unsafes.objects.filter(observe__in=a,unsafedicclass=i).count()) + elif i.dicid==27: + gjhsb.append(Unsafes.objects.filter(observe__in=a,unsafedicclass=i).count()) + elif i.dicid==28: + cxhbz.append(Unsafes.objects.filter(observe__in=a,unsafedicclass=i).count()) + elif i.dicid==29: + rtgcx.append(Unsafes.objects.filter(observe__in=a,unsafedicclass=i).count()) + elif i.dicid==30: + hjzj.append(Unsafes.objects.filter(observe__in=a,unsafedicclass=i).count()) + - + return JsonResponse({'code':1,'months':months,'userfy':userfy,'userwz':userwz,'grfh':grfh,'gjhsb':gjhsb,'cxhbz':cxhbz,'rtgcx':rtgcx,'hjzj':hjzj,}) + elif req.GET.get('a')=='gclxbg': + userid = req.session['userid'] + companyid = getcompany(userid) + a = Observe.objects.filter(usecomp=Partment.objects.get(partid=companyid),deletemark=1) + + if req.GET.get('qssj'):#开始时间 + a = a.filter(looktime__gte=req.GET.get('qssj')) + if req.GET.get('jssj'):#结束时间 + a = a.filter(looktime__lte=req.GET.get('jssj')) + if req.GET.get('fxbm'): + gcbm = req.GET.get('fxbm') + parts = Partment.objects.filter(partlink__contains=',' + gcbm + ',')|Partment.objects.filter(partid=gcbm) + a = a.filter(lookpart__in=parts) + + total = a.count() + objs = a.values('looker__userid','looker__name','lookpart__partname').annotate(number = Count('looker')).order_by('-number') + return HttpResponse(transjson(total,objs),content_type="application/json") + + + def dicchandle(req): a = req.GET.get('a') if a == 'tree': diff --git a/static/safesite/easyui/themes/icons/behv.png b/static/safesite/easyui/themes/icons/behv.png new file mode 100644 index 0000000000000000000000000000000000000000..8ce205131966ff32cc66a1dbe1dffc9f88b01ba7 GIT binary patch literal 1066 zcmV+_1l9YAP)q*e8g6f_P34e1dpR5a$G8P7u68nJmI= zB)>O{!5gpzsPd|%7A;v4diI;q3R>!}Usb<;RTC;coz<_uacK1cJ^-UjL|xg+%u^7i z0FB8CM_&Ewr;10aI<7I#}uR?W9yIswqCc<>Cw!+HJod`8pRwmpRaI;&p>2x}iU zhWQGN%h19Ibxg0xoyy@q1wS9usMaE;0T=@!JdcgeV6Bh6`d^o2AaVh;gWh`r#A`74 zPbQpQH{8)SZ{+>n(&-c9j6koV{TTZ81m)g0_bTGhy*~K^N-4N;={)p*PtR0 z^)KqbwSJxDgaV-0zTEw;egdbyJsCbE?0U~0J6%mu#f!i>vOq%U*}SpXH>*Pd=-fGH zAbJPzm1nyL4>c}^ttE-KEzt+Iaj1c`181a&$^5&wrv z44nJ+MAd%L(+PSKUX`LeuA~9*RoKA5V)xr zJZ~%xcbB_IqI$xkg}pc^YeJo%m$D}j*a|>&VmD}hkrphuUo;jMPnJzlxECp~IYM)v zs2Kq5yWUhfSXm14bRrfnDc|I&nnttYwvy14(kxLsfisJAK6e&z<+qQtGZ;u>W#$8`>iUPTZRU?#-2TSsSi)L(|iE3st1xP&8vOqd{?8K!IfBw zqfnY5+_dJ{f5s<&XEMmEkSc2%o#2~!0SCDn`=Jo0V#P!5bp7BO8&!#4Nx#HEUH z`KBE>pH({Zno(>_CfldkDM*l432zyYO*+%w%bx#yAW2Dh(LiDlFCNJ-3yEJp*7LZ8 zr3K5NliTd_hSH>`Gr|+!{(4?D&&4IG-YD75%5>3Kt|Or~hQy~;qY;ng@3el1=LGJ@ zvV9N4mWzoc(NIbkUBT#*i7(B8M8+_z@Z19WkjqItFUVvKD?E}R)U2p%B(`78g60WG zE-4$yEl&yGfH9ogw?i}BMIcH6n1)0#IjqH(Q|js~m}mru Date: Fri, 18 Oct 2019 16:44:35 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E9=A3=8E=E9=99=A9=E5=88=86=E6=9E=90?= =?UTF-8?q?=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- safesite/templates/riskas.html | 8 ++++---- safesite/views.py | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/safesite/templates/riskas.html b/safesite/templates/riskas.html index 763fe778..38893243 100644 --- a/safesite/templates/riskas.html +++ b/safesite/templates/riskas.html @@ -51,10 +51,10 @@ // } function fxsearch() { var querydata = $('#fxfxf').serializeJSON(); - bindmap_fxdlxt('fxdlxt'); - bindmap_fxdjbt('fxdjbt'); - bindmap_fxjbt('fxjbt'); - bindmap_fxdqyt('fxdqyt'); + bindmap_fxdlxt('fxdlxt',querydata); + bindmap_fxdjbt('fxdjbt',querydata); + bindmap_fxjbt('fxjbt',querydata); + bindmap_fxdqyt('fxdqyt',querydata); } var now = new Date(); var year = now.getFullYear(); diff --git a/safesite/views.py b/safesite/views.py index 220685a4..b72b1b10 100644 --- a/safesite/views.py +++ b/safesite/views.py @@ -1991,7 +1991,8 @@ def apiriskas(req): objs2 = Risk.objects.filter(usecomp__partid=companyid) if req.GET.get('zrbm',None): partid = req.GET.get('zrbm') - objs = objs.filter(riskact__zrbm__partid=partid) + objs = objs.filter(zrbm__partid=partid) + objs2 = objs2.filter(riskact__zrbm__partid=partid) xAxisData = [] series = [] #areas = Area.objects.filter(usecomp__partid=companyid,deletemark=1) From 3da5b1851e7daafd42712af6843ec2ebbd889790 Mon Sep 17 00:00:00 2001 From: shilixia <2309368887@qq.com> Date: Fri, 18 Oct 2019 17:18:01 +0800 Subject: [PATCH 5/6] nianxian --- safesite/templates/behavior.html | 227 ++++++++++++++++--------------- 1 file changed, 118 insertions(+), 109 deletions(-) diff --git a/safesite/templates/behavior.html b/safesite/templates/behavior.html index 88bf8b64..1fe2d098 100644 --- a/safesite/templates/behavior.html +++ b/safesite/templates/behavior.html @@ -6,11 +6,14 @@ month = now.getMonth() + 1; for (var i = 0; i < 5; i++) { $('#year').append(''); + $('#years').append(''); } $.get('api/tool?a=servertime', function (res) { $('#year').combobox().combobox('setValue', res.year); + $('#years').combobox().combobox('setValue', res.year); $('#month').combobox().combobox('setValue', res.month); behaviorDate(); + gczxt(); }) }); @@ -151,139 +154,145 @@ function funTypeChange() { behaviorDate();//饼图 } + function funTypeChange2() { + gczxt(); + } + function gczxt() {//行为观察折线图 + var y = $("#years").val(); + //行为观察折线图 + $.ajax({ + type: "get", + async: true, //异步请求(同步请求将会锁住浏览器,用户其他操作必须等待请求完成才可以执行) + url: "api/obscount?a=gclzx&year=" + y, //请求发送 + dataType: "json", //返回数据形式为json + success: function (data) { + //请求成功时执行该函数内容,data即为服务器返回的json对象 - var y = now.getFullYear(); - //行为观察折线图 - $.ajax({ - type: "get", - async: true, //异步请求(同步请求将会锁住浏览器,用户其他操作必须等待请求完成才可以执行) - url: "api/obscount?a=gclzx&year=" + y, //请求发送 - dataType: "json", //返回数据形式为json - success: function (data) { - //请求成功时执行该函数内容,data即为服务器返回的json对象 - - var gcChart2 = echarts.init(document.getElementById("piecontainer2")); - gcChart2.hideLoading(); - gcChart2.setOption(option = { - title: { - text: '行为观察折线图' - }, - tooltip: { - trigger: 'axis' - }, - legend: { - data: ['人员的反映', '员工的位置', '个人防护装备', '工具和设备', '程序和标准','人体工程学','环境整洁'] - }, - grid: { - left: '3%', - right: '4%', - bottom: '3%', - containLabel: true - }, - toolbox: { - feature: { - saveAsImage: {} - } - }, - xAxis: { - type: 'category', - boundaryGap: false, - data: data.months - }, - yAxis: { - type: 'value' - }, - series: [ - { - name: '人员的反映', - type: 'line', - stack: '总量', - data: data.userfy + var gcChart2 = echarts.init(document.getElementById("piecontainer2")); + + gcChart2.setOption(option = { + title: { + text: '行为观察折线图' }, - { - name: '员工的位置', - type: 'line', - stack: '总量', - data: data.userwz + tooltip: { + trigger: 'axis' }, - { - name: '个人防护装备', - type: 'line', - stack: '总量', - data: data.grfh + legend: { + data: ['人员的反映', '员工的位置', '个人防护装备', '工具和设备', '程序和标准', '人体工程学', '环境整洁'] }, - { - name: '工具和设备', - type: 'line', - stack: '总量', - data: data.gjhsb + grid: { + left: '3%', + right: '4%', + bottom: '3%', + containLabel: true }, - { - name: '程序和标准', - type: 'line', - stack: '总量', - data: data.cxhbz - } - , - { - name: '人体工程学', - type: 'line', - stack: '总量', - data: data.rtgcx + toolbox: { + feature: { + saveAsImage: {} + } }, - { - name: '环境整洁', - type: 'line', - stack: '总量', - data: data.hjzj - } - ] - }); - }, - error: function (errorMsg) { - gcChart2.hideLoading(); - } - }); + xAxis: { + type: 'category', + boundaryGap: false, + data: data.months + }, + yAxis: { + type: 'value' + }, + series: [ + { + name: '人员的反映', + type: 'line', + stack: '总量', + data: data.userfy + }, + { + name: '员工的位置', + type: 'line', + stack: '总量', + data: data.userwz + }, + { + name: '个人防护装备', + type: 'line', + stack: '总量', + data: data.grfh + }, + { + name: '工具和设备', + type: 'line', + stack: '总量', + data: data.gjhsb + }, + { + name: '程序和标准', + type: 'line', + stack: '总量', + data: data.cxhbz + } + , + { + name: '人体工程学', + type: 'line', + stack: '总量', + data: data.rtgcx + }, + { + name: '环境整洁', + type: 'line', + stack: '总量', + data: data.hjzj + } + ] + }); + }, + error: function (errorMsg) { + gcChart2.hideLoading(); + } + }); + } +
- + +
- - - + + + -
+
-
+
- +
- + @@ -306,7 +315,7 @@ - + \ No newline at end of file From e63737a9fad5c365b7c5faa1f817cbb526d0c784 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 21 Oct 2019 10:28:58 +0800 Subject: [PATCH 6/6] groups1 --- .../migrations/0278_auto_20191018_1723.py | 24 + safesite/models.py | 2 +- safesite/templates/main.html | 3 +- .../bower_components/bootstrap/CHANGELOG.md | 5 + .../groups/bower_components/bootstrap/Gemfile | 8 + .../bower_components/bootstrap/Gemfile.lock | 74 + .../bower_components/bootstrap/Gruntfile.js | 430 + .../bootstrap/ISSUE_TEMPLATE.md | 22 + .../groups/bower_components/bootstrap/LICENSE | 21 + .../bower_components/bootstrap/README.md | 149 + .../bower_components/bootstrap/bower.json | 34 + .../bootstrap/dist/css/bootstrap-theme.css | 587 ++ .../dist/css/bootstrap-theme.css.map | 1 + .../dist/css/bootstrap-theme.min.css | 6 + .../dist/css/bootstrap-theme.min.css.map | 1 + .../bootstrap/dist/css/bootstrap.css | 6834 +++++++++++++ .../bootstrap/dist/css/bootstrap.css.map | 1 + .../bootstrap/dist/css/bootstrap.min.css | 6 + .../bootstrap/package-lock.json | 8870 +++++++++++++++++ .../bower_components/bootstrap/package.js | 32 + .../bower_components/bootstrap/package.json | 101 + static/safesite/easyui/changelog.txt | 649 ++ .../easyui/demo/timespinner/hour12.html | 25 + static/safesite/easyui/license_freeware.txt | 14 + static/safesite/easyui/readme.txt | 4 + .../safesite/easyui/themes/default/easyui.css | 10 +- static/safesite/easyui/themes/icon.css | 7 +- static/safesite/easyui/themes/icons/gmt.png | Bin 0 -> 859 bytes static/safesite/easyui/themes/react.css | 659 ++ static/safesite/muban/tm.xlsx | Bin 0 -> 10684 bytes static/safesite/mystatic/js/conversion.js | 1 + static/safesite/mystatic/js/util.js | 18 +- 32 files changed, 18584 insertions(+), 14 deletions(-) create mode 100644 safesite/migrations/0278_auto_20191018_1723.py create mode 100644 static/groups/bower_components/bootstrap/CHANGELOG.md create mode 100644 static/groups/bower_components/bootstrap/Gemfile create mode 100644 static/groups/bower_components/bootstrap/Gemfile.lock create mode 100644 static/groups/bower_components/bootstrap/Gruntfile.js create mode 100644 static/groups/bower_components/bootstrap/ISSUE_TEMPLATE.md create mode 100644 static/groups/bower_components/bootstrap/LICENSE create mode 100644 static/groups/bower_components/bootstrap/README.md create mode 100644 static/groups/bower_components/bootstrap/bower.json create mode 100644 static/groups/bower_components/bootstrap/dist/css/bootstrap-theme.css create mode 100644 static/groups/bower_components/bootstrap/dist/css/bootstrap-theme.css.map create mode 100644 static/groups/bower_components/bootstrap/dist/css/bootstrap-theme.min.css create mode 100644 static/groups/bower_components/bootstrap/dist/css/bootstrap-theme.min.css.map create mode 100644 static/groups/bower_components/bootstrap/dist/css/bootstrap.css create mode 100644 static/groups/bower_components/bootstrap/dist/css/bootstrap.css.map create mode 100644 static/groups/bower_components/bootstrap/dist/css/bootstrap.min.css create mode 100644 static/groups/bower_components/bootstrap/package-lock.json create mode 100644 static/groups/bower_components/bootstrap/package.js create mode 100644 static/groups/bower_components/bootstrap/package.json create mode 100644 static/safesite/easyui/changelog.txt create mode 100644 static/safesite/easyui/demo/timespinner/hour12.html create mode 100644 static/safesite/easyui/license_freeware.txt create mode 100644 static/safesite/easyui/readme.txt create mode 100644 static/safesite/easyui/themes/icons/gmt.png create mode 100644 static/safesite/easyui/themes/react.css create mode 100644 static/safesite/muban/tm.xlsx create mode 100644 static/safesite/mystatic/js/conversion.js diff --git a/safesite/migrations/0278_auto_20191018_1723.py b/safesite/migrations/0278_auto_20191018_1723.py new file mode 100644 index 00000000..d704cc7b --- /dev/null +++ b/safesite/migrations/0278_auto_20191018_1723.py @@ -0,0 +1,24 @@ +# Generated by Django 2.1.5 on 2019-10-18 17:23 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('safesite', '0277_remove_companyinfo_liaison_fax'), + ] + + operations = [ + migrations.AlterField( + model_name='riskact', + name='area', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='riskactarea', to='safesite.Area'), + ), + migrations.AlterField( + model_name='safecert', + name='url', + field=models.CharField(blank=True, max_length=1000, null=True), + ), + ] diff --git a/safesite/models.py b/safesite/models.py index 76efbbe4..51c28e6c 100644 --- a/safesite/models.py +++ b/safesite/models.py @@ -374,7 +374,7 @@ class Safecert(models.Model):#安全资格证书 yxqkssj = models.DateField(null=True,blank=True) yxqjssj = models.DateField(null=True,blank=True) zszt = models.IntegerField(choices = type_choices,null=True,blank=True) - url = models.CharField(max_length=200,null=True,blank=True) + url = models.CharField(max_length=1000,null=True,blank=True) class Suggest(models.Model):#合理化建议 ZT_CHOICES = ( diff --git a/safesite/templates/main.html b/safesite/templates/main.html index f87af4a3..5a85e0aa 100644 --- a/safesite/templates/main.html +++ b/safesite/templates/main.html @@ -326,7 +326,7 @@ float: left;"> -
+
element. + * combo: Add 'selectOnNavigation' and 'readonly' options. + * combobox: Add 'loadFilter' option to allow users to change data format before loading into combobox. + * tree: Add 'onBeforeDrop' callback event. + * validatebox: Dependent on tooltip plugin now, add 'deltaX' property. + * numberbox: The 'filter' options can be used to determine if the key pressed was accepted. + * linkbutton: The group button is available. + * layout: The 'minWidth','maxWidth','minHeight','maxHeight' and 'collapsible' properties are available for region panel. +* New Plugins + * tooltip: Display a popup message when moving mouse over an element. + +Version 1.3.2 +------------- +* Bug + * datagrid: The loading message window can not be centered when changing the width of datagrid. fixed. + * treegrid: The 'mergeCells' method can not work normally. fixed. + * propertygrid: Calling 'endEdit' method to stop editing a row will cause errors. fixed. + * tree: Can not load empty data when 'lines' property set to true. fixed. +* Improvement + * RTL feature is supported now. + * tabs: Add 'scrollBy' method to scroll the tab header by the specified amount of pixels + * tabs: Add 'toolPosition' property to set tab tools to left or right. + * tabs: Add 'tabPosition' property to define the tab position, possible values are: 'top','bottom','left','right'. + * datagrid: Add a column level property 'order' that allows users to define different default sort order per column. + * datagrid: Add a column level property 'halign' that allows users to define how to align the column header. + * datagrid: Add 'resizeHandle' property to define the resizing column position, by grabbing the left or right edge of the column. + * datagrid: Add 'freezeRow' method to freeze some rows that will always be displayed at the top when the datagrid is scrolled down. + * datagrid: Add 'clearChecked' method to clear all checked records. + * datagrid: Add 'data' property to initialize the datagrid data. + * linkbutton: Add 'iconAlgin' property to define the icon position, supported values are: 'left','right'. + * menu: Add 'minWidth' property. + * menu: The menu width can be automatically calculated. + * tree: New events are available including 'onBeforeDrag','onStartDrag','onDragEnter','onDragOver','onDragLeave',etc. + * combo: Add 'height' property to allow users to define the height of combo. + * combo: Add 'reset' method. + * numberbox: Add 'reset' method. + * spinner: Add 'reset' method. + * spinner: Add 'height' property to allow users to define the height of spinner. + * searchbox: Add 'height' property to allow users to define the height of searchbox. + * form: Add 'reset' method. + * validatebox: Add 'delay' property to delay validating from the last inputting value. + * validatebox: Add 'tipPosition' property to define the tip position, supported values are: 'left','right'. + * validatebox: Multiple validate rules on a field is supported now. + * slider: Add 'reversed' property to determine if the min value and max value will switch their positions. + * progressbar: Add 'height' property to allow users to define the height of progressbar. + +Version 1.3.1 +------------- +* Bug + * datagrid: Setting the 'pageNumber' property is not valid. fixed. + * datagrid: The id attribute of rows isn't adjusted properly while calling 'insertRow' or 'deleteRow' method. + * dialog: When load content from 'href', the script will run twice. fixed. + * propertygrid: The editors that extended from combo can not accept its changed value. fixed. +* Improvement + * droppable: Add 'disabled' property. + * droppable: Add 'options','enable' and 'disable' methods. + * tabs: The tab panel tools can be changed by calling 'update' method. + * messager: When show a message window, the user can define the window position by applying 'style' property. + * window: Prevent script on window body from running twice. + * window: Add 'hcenter','vcenter' and 'center' methods. + * tree: Add 'onBeforeCheck' callback event. + * tree: Extend the 'getChecked' method to allow users to get 'checked','unchecked' or 'indeterminate' nodes. + * treegrid: Add 'update' method to update a specified node. + * treegrid: Add 'insert' method to insert a new node. + * treegrid: Add 'pop' method to remove a node and get the removed node data. + +Version 1.3 +----------- +* Bug + * combogrid: When set to 'remote' query mode, the 'queryParams' parameters can't be sent to server. fixed. + * combotree: The tree nodes on drop-down panel can not be unchecked while calling 'clear' method. fixed. + * datetimebox: Setting 'showSeconds' property to false cannot hide seconds info. fixed. + * datagrid: Calling 'mergeCells' method can't auto resize the merged cell while header is hidden. fixed. + * dialog: Set cache to false and load data via ajax, the content cannot be refreshed. fixed. +* Improvement + * The HTML5 'data-options' attribute is available for components to declare all custom options, including properties and events. + * More detailed documentation is available. + * panel: Prevent script on panel body from running twice. + * accordion: Add 'getPanelIndex' method. + * accordion: The tools can be added on panel header. + * datetimebox: Add 'timeSeparator' option that allows users to define the time separator. + * pagination: Add 'refresh' and 'select' methods. + * datagrid: Auto resize the column width to fit the contents when the column width is not defined. + * datagrid: Double click on the right border of columns to auto resize the columns to the contents in the columns. + * datagrid: Add 'autoSizeColumn' method that allows users to adjust the column width to fit the contents. + * datagrid: Add 'getChecked' method to get all rows where the checkbox has been checked. + * datagrid: Add 'selectOnCheck' and 'checkOnSelect' properties and some checking methods to enhance the row selections. + * datagrid: Add 'pagePosition' property to allow users to display pager bar at either top,bottom or both places of the grid. + * datagrid: The buffer view and virtual scroll view are supported to display large amounts of records without pagination. + * tabs: Add 'disableTab' and 'enableTab' methods to allow users to disable or enable a tab panel. + +Version 1.2.6 +------------- +* Bug + * tabs: Call 'add' method with 'selected:false' option, the added tab panel is always selected. fixed. + * treegrid: The 'onSelect' and 'onUnselect' events can't be triggered. fixed. + * treegrid: Cannot display zero value field. fixed. +* Improvement + * propertygrid: Add 'expandGroup' and 'collapseGroup' methods. + * layout: Allow users to create collapsed layout panels by assigning 'collapsed' property to true. + * layout: Add 'add' and 'remove' methods that allow users to dynamically add or remove region panel. + * layout: Additional tool icons can be added on region panel header. + * calendar: Add 'firstDay' option that allow users to set first day of week. Sunday is 0, Monday is 1, ... + * tree: Add 'lines' option, true to display tree lines. + * tree: Add 'loadFilter' option that allow users to change data format before loading into the tree. + * tree: Add 'loader' option that allow users to define how to load data from remote server. + * treegrid: Add 'onClickCell' and 'onDblClickCell' callback function options. + * datagrid: Add 'autoRowHeight' property that allow users to determine if set the row height based on the contents of that row. + * datagrid: Improve performance to load large data set. + * datagrid: Add 'loader' option that allow users to define how to load data from remote server. + * treegrid: Add 'loader' option that allow users to define how to load data from remote server. + * combobox: Add 'onBeforeLoad' callback event function. + * combobox: Add 'loader' option that allow users to define how to load data from remote server. + * Add support for other loading mode such as dwr,xml,etc. +* New Plugins + * slider: Allows the user to choose a numeric value from a finite range. + +Version 1.2.5 +------------- +* Bug + * tabs: When add a new tab panel with href property, the content page is loaded twice. fixed. + * form: Failed to call 'load' method to load form input with complex name. fixed. + * draggable: End drag in ie9, the cursor cannot be restored. fixed. +* Improvement + * panel: The tools can be defined via html markup. + * tabs: Call 'close' method to close specified tab panel, users can pass tab title or index of tab panel. Other methods such 'select','getTab' and 'exists' are similar to 'close' method. + * tabs: Add 'getTabIndex' method. + * tabs: Users can define mini tools on tabs. + * tree: The mouse must move a specified distance to begin drag and drop operation. + * resizable: Add 'options','enable' and 'disable' methods. + * numberbox: Allow users to change number format. + * datagrid: The subgrid is supported now. + * searchbox: Add 'selectName' method to select searching type name. + +Version 1.2.4 +------------- +* Bug + * menu: The menu position is wrong when scroll bar appears. fixed. + * accordion: Cannot display the default selected panel in jQuery 1.6.2. fixed. + * tabs: Cannot display the default selected tab panel in jQuery 1.6.2. fixed. +* Improvement + * menu: Allow users to disable or enable menu item. + * combo: Add 'delay' property to set the delay time to do searching from the last key input event. + * treegrid: The 'getEditors' and 'getEditor' methods are supported now. + * treegrid: The 'loadFilter' option is supported now. + * messager: Add 'progress' method to display a message box with a progress bar. + * panel: Add 'extractor' option to allow users to extract panel content from ajax response. +* New Plugins + * searchbox: Allow users to type words into box and do searching operation. + * progressbar: To display the progress of a task. + +Version 1.2.3 +------------- +* Bug + * window: Cannot resize the window with iframe content. fixed. + * tree: The node will be removed when dragging to its child. fixed. + * combogrid: The onChange event fires multiple times. fixed. + * accordion: Cannot add batch new panels when animate property is set to true. fixed. +* Improvement + * treegrid: The footer row and row styler features are supported now. + * treegrid: Add 'getLevel','reloadFooter','getFooterRows' methods. + * treegrid: Support root nodes pagination and editable features. + * datagrid: Add 'getFooterRows','reloadFooter','insertRow' methods and improve editing performance. + * datagrid: Add 'loadFilter' option that allow users to change original source data to standard data format. + * draggable: Add 'onBeforeDrag' callback event function. + * validatebox: Add 'remote' validation type. + * combobox: Add 'method' option. +* New Plugins + * propertygrid: Allow users to edit property value in datagrid. + +Version 1.2.2 +------------- +* Bug + * datagrid: Apply fitColumns cannot work fine while set checkbox column. fixed. + * datagrid: The validateRow method cannot return boolean type value. fixed. + * numberbox: Cannot fix value in chrome when min or max property isn't defined. fixed. +* Improvement + * menu: Add some crud methods. + * combo: Add hasDownArrow property to determine whether to display the down arrow button. + * tree: Supports inline editing. + * calendar: Add some useful methods such as 'resize', 'moveTo' etc. + * timespinner: Add some useful methods. + * datebox: Refactoring based on combo and calendar plugin now. + * datagrid: Allow users to change row style in some conditions. + * datagrid: Users can use the footer row to display summary information. +* New Plugins + * datetimebox: Combines datebox with timespinner component. + +Version 1.2.1 +------------- +* Bug + * easyloader: Some dependencies cannot be loaded by their order. fixed. + * tree: The checkbox is setted incorrectly when removing a node. fixed. + * dialog: The dialog layout incorrectly when 'closed' property is setted to true. fixed. +* Improvement + * parser: Add onComplete callback function that can indicate whether the parse action is complete. + * menu: Add onClick callback function and some other methods. + * tree: Add some useful methods. + * tree: Drag and Drop feature is supported now. + * tree: Add onContextMenu callback function. + * tabs: Add onContextMenu callback function. + * tabs: Add 'tools' property that can create buttons on right bar. + * datagrid: Add onHeaderContextMenu and onRowContextMenu callback functions. + * datagrid: Custom view is supported. + * treegrid: Add onContextMenu callback function and append,remove methods. + +Version 1.2 +------------- +* Improvement + * tree: Add cascadeCheck,onlyLeafCheck properties and select event. + * combobox: Enable multiple selection. + * combotree: Enable multiple selection. + * tabs: Remember the trace of selection, when current tab panel is closed, the previous selected tab will be selected. + * datagrid: Extend from panel, so many properties defined in panel can be used for datagrid. +* New Plugins + * treegrid: Represent tabular data in hierarchical view, combines tree view and datagrid. + * combo: The basic component that allow user to extend their combo component such as combobox,combotree,etc. + * combogrid: Combines combobox with drop-down datagrid component. + * spinner: The basic plugin to create numberspinner,timespinner,etc. + * numberspinner: The numberbox that allow user to change value by clicking up and down spin buttons. + * timespinner: The time selector that allow user to quickly inc/dec a time. + +Version 1.1.2 +------------- +* Bug + * messager: When call show method in layout, the message window will be blocked. fixed. +* Improvement + * datagrid: Add validateRow method, remember the current editing row status when do editing action. + * datagrid: Add the ability to create merged cells. + * form: Add callback functions when loading data. + * panel,window,dialog: Add maximize,minimize,restore,collapse,expand methods. + * panel,tabs,accordion: The lazy loading feature is supported. + * tabs: Add getSelected,update,getTab methods. + * accordion: Add crud methods. + * linkbutton: Accept an id option to set the id attribute. + * tree: Enhance tree node operation. + +Version 1.1.1 +------------- +* Bug + * form: Cannot clear the value of combobox and combotree component. fixed. +* Improvement + * tree: Add some useful methods such as 'getRoot','getChildren','update',etc. + * datagrid: Add editable feature, improve performance while loading data. + * datebox: Add destroy method. + * combobox: Add destroy and clear method. + * combotree: Add destroy and clear method. + +Version 1.1 +------------- +* Bug + * messager: When call show method with timeout property setted, an error occurs while clicking the close button. fixed. + * combobox: The editable property of combobox plugin is invalid. fixed. + * window: The proxy box will not be removed when dragging or resizing exceed browser border in ie. fixed. +* Improvement + * menu: The menu item can use markup to display a different page. + * tree: The tree node can use markup to act as a tree menu. + * pagination: Add some event on refresh button and page list. + * datagrid: Add a 'param' parameter for reload method, with which users can pass query parameter when reload data. + * numberbox: Add required validation support, the usage is same as validatebox plugin. + * combobox: Add required validation support. + * combotree: Add required validation support. + * layout: Add some method that can get a region panel and attach event handlers. +* New Plugins + * droppable: A droppable plugin that supports drag drop operation. + * calendar: A calendar plugin that can either be embedded within a page or popup. + * datebox: Combines a textbox with a calendar that let users to select date. + * easyloader: A JavaScript loader that allows you to load plugin and their dependencies into your page. + +Version 1.0.5 +* Bug + * panel: The fit property of panel performs incorrectly. fixed. +* Improvement + * menu: Add a href attribute for menu item, with which user can display a different page in the current browser window. + * form: Add a validate method to do validation for validatebox component. + * dialog: The dialog can read collapsible,minimizable,maximizable and resizable attribute from markup. +* New Plugins + * validatebox: A validation plugin that checks to make sure the user's input value is valid. + +Version 1.0.4 +------------- +* Bug + * panel: When panel is invisible, it is abnormal when resized. fixed. + * panel: Memory leak in method 'destroy'. fixed. + * messager: Memory leak when messager box is closed. fixed. + * dialog: No onLoad event occurs when loading remote data. fixed. +* Improvement + * panel: Add method 'setTitle'. + * window: Add method 'setTitle'. + * dialog: Add method 'setTitle'. + * combotree: Add method 'getValue'. + * combobox: Add method 'getValue'. + * form: The 'load' method can load data and fill combobox and combotree field correctly. + +Version 1.0.3 +------------- +* Bug + * menu: When menu is show in a DIV container, it will be cropped. fixed. + * layout: If you collpase a region panel and then expand it immediately, the region panel will not show normally. fixed. + * accordion: If no panel selected then the first one will become selected and the first panel's body height will not set correctly. fixed. +* Improvement + * tree: Add some methods to support CRUD operation. + * datagrid: Toolbar can accept a new property named 'disabled' to disable the specified tool button. +* New Plugins + * combobox: Combines a textbox with a list of options that users are able to choose from. + * combotree: Combines combobox with drop-down tree component. + * numberbox: Make input element can only enter number char. + * dialog: rewrite the dialog plugin, dialog can contains toolbar and buttons. diff --git a/static/safesite/easyui/demo/timespinner/hour12.html b/static/safesite/easyui/demo/timespinner/hour12.html new file mode 100644 index 00000000..89018512 --- /dev/null +++ b/static/safesite/easyui/demo/timespinner/hour12.html @@ -0,0 +1,25 @@ + + + + + 12 Hour Format - jQuery EasyUI Demo + + + + + + + +

12 Hour Format

+

Displays in a 12 hour format.

+
+
+
+ +
+
+ +
+
+ + \ No newline at end of file diff --git a/static/safesite/easyui/license_freeware.txt b/static/safesite/easyui/license_freeware.txt new file mode 100644 index 00000000..cbd29de1 --- /dev/null +++ b/static/safesite/easyui/license_freeware.txt @@ -0,0 +1,14 @@ +This license agreement refers to EasyUI for jQuery software - Freeware License. + +EasyUI Team grants to you a limited, non-transferable and non-exclusive right to use, royalty-free, copy and redistribute the software. + +The licensee has the right to use the software for a non-profit projects/sites. There are no limitations on the number of non-profit projects/sites you can use the software in, you can use it on any number of non-profit projects/sites you need. There is no time limit, you can use the software for any period of time you need. There is no restriction while you are developing your solution. There are no royalties of any kind involved. + +The governmental entities are not allowed to use this freeware license. + +The licensee is allowed to copy and redistribute the software but you may not: +a) Distribute the modified software or part(s) of it as a standalone application. +b) Sublicense, rent, lease or lend any portion of the software as a standalone application. +c) Modify or remove any copyright notices from any of the software files. + +EasyUI Team retains all ownership rights to the software. diff --git a/static/safesite/easyui/readme.txt b/static/safesite/easyui/readme.txt new file mode 100644 index 00000000..37e5909e --- /dev/null +++ b/static/safesite/easyui/readme.txt @@ -0,0 +1,4 @@ +Current Version: 1.7.0 +====================== +This software is allowed to use under freeware license or you need to buy commercial license for better support or other purpose. +Please contact us at info@jeasyui.com diff --git a/static/safesite/easyui/themes/default/easyui.css b/static/safesite/easyui/themes/default/easyui.css index 579bac75..64ed3ae7 100644 --- a/static/safesite/easyui/themes/default/easyui.css +++ b/static/safesite/easyui/themes/default/easyui.css @@ -1,5 +1,5 @@ .panel { - overflow: hidden; + /*overflow: hidden;*/ text-align: left; margin: 0; border: 0; @@ -37,11 +37,7 @@ border-bottom-width: 0; } .panel-with-icon { -<<<<<<< HEAD - padding-left: 20px; -======= - padding-left: 10px; ->>>>>>> 0ed848ff177ad9c427f58c714cb22f8012e2c913 + padding-left: 20px; } .panel-icon, .panel-tool { @@ -3411,7 +3407,7 @@ height: 40px; line-height: 30px; color: #313030; - margin-left: 25px; + margin-left: 10px; } .sidemenu .accordion-header:hover { background: #0066cc; diff --git a/static/safesite/easyui/themes/icon.css b/static/safesite/easyui/themes/icon.css index 1cf78d04..b3d93cc6 100644 --- a/static/safesite/easyui/themes/icon.css +++ b/static/safesite/easyui/themes/icon.css @@ -148,6 +148,9 @@ .icon-edu{ background:url('icons/edu.png') no-repeat center center; } +.icon-gmt { + background: url('icons/gmt.png') no-repeat center center; +} .icon-regulationstype { background: url('icons/regulationstype.png') no-repeat center center; } @@ -163,7 +166,9 @@ .icon-taskdo{ background:url('icons/taskdo.png') no-repeat center center; } - +.icon-bhr { + background: url('icons/behv.png') no-repeat center center; +} diff --git a/static/safesite/easyui/themes/icons/gmt.png b/static/safesite/easyui/themes/icons/gmt.png new file mode 100644 index 0000000000000000000000000000000000000000..fb4e104381ad83b7636750d0d874991e0389f7fb GIT binary patch literal 859 zcmV-h1ElWv?5Pf5tNNs*Zca_=@dV-Q=3kV|BtjP&VPSE58B_{|uLCFb9x3CCNh`J0tK?tN$ zcO@igB`}_9h;1APo4ABcRjT1> ztH;$kh}cOfI0{fA3;=KNc1rg>;CLVFQ>;;QHg^YNaG8h#)5^?o0u|;0APk@X0sLDT zkosq)?JydUvURVwt6=0QCNjOH$U%2~qwzDpyO|mSkhD008U&*kj;JC#B~FrO=@; z%EYwR*R*wC0FR-8Q4b+dZ&8c8xnDi07KrJS^o}46G))EJL}-$`XPg6A1Gw2&Bb#=U zax?+#x6^uYZWIXTP<J6~JI9D7BON?rNi2CQ!DW(&IwOTmYEF`xnXFw(x!PG}2nR zHnu^MP5uc`+}+@2)&LQgWEOCh!KHA%a$^+QDZOOBfBy9_zA!Y-7<|x4<($Sfvj!9s zC28CCMy$~0)f2TYwck$b&+PYBIVQYmB?<8}9GsXB`(5N;&jyAml#{is>-Yz#wkX=9V*})wEPM^MOtHB_~07hdL zgIfbNlDBHV?sdIM!KU6^f)Kc`WCVO5LLQ7=5uP+5@BBA60M_Xb25O`@O?19aIGynO lD{g6{A~Q.textbox-addon .textbox-icon, +.textbox-readonly>.textbox-addon .textbox-icon{ + cursor: default; +} +.textbox-disabled>.textbox-addon .textbox-icon:hover, +.textbox-readonly>.textbox-addon .textbox-icon:hover{ + opacity: 0.6; + cursor: default; +} +.textbox-addon .textbox-icon{ + width: 26px; + height: 18px; +} + +.spinner .textbox-text{ + height: auto; +} +.spinner-button-left,.spinner-button-right{ + width: 26px; +} +.spinner-button-updown{ + width: 26px; +} +.spinner-button-top,.spinner-button-bottom{ + position: absolute; + width: 100%; + height: 26px; +} +.spinner-button-top{ + top: 0; +} +.spinner-button-bottom{ + top: auto; + bottom: 0; +} +.spinner-button{ + display: inline-block; + position: absolute; + width: 16px; + height: 16px; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.spinner-arrow{ + cursor: pointer; + opacity: 0.6; +} + +.textbox-disabled .spinner-arrow:hover, +.textbox-readonly .spinner-arrow:hover +{ + opacity: 0.6; + cursor: default; +} +.textbox-readonly .spinner-arrow .spinner-arrow-up:hover, +.textbox-disabled .spinner-arrow .spinner-arrow-up:hover, +.textbox-readonly .spinner-arrow .spinner-arrow-down:hover, +.textbox-disabled .spinner-arrow .spinner-arrow-down:hover +{ + cursor: default; +} + +.l-btn{ + width1: 100%; +} +.l-btn-empty{ + height: 28px; +} +.l-btn-large .l-btn-empty{ + height: 44px; +} +.l-btn-left{ + overflow: visible; +} +.m-btn .l-btn-left .m-btn-line{ + top: -100px; + width: 36px; + right: -20px; +} +.button-group .l-btn.f-inline-row{ + margin-left: -1px; +} +.button-group .l-btn:hover{ + z-index: 99; +} +.button-group .l-btn:not(:first-child):not(:last-child){ + border-radius: 0; +} +.button-group .l-btn:first-child{ + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.button-group .l-btn:last-child{ + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + +.switchbutton{ + width: 70px; + height: 30px; +} +.switchbutton-on,.switchbutton-off{ + position: absolute; + left: 0; + width: calc(100% - 15px); + height: 100%; +} +.switchbutton-on span,.switchbutton-off span,.switchbutton-handle span{ + height: 100%; +} +.switchbutton-on span{ + text-indent: -15px; +} +.switchbutton-off span{ + text-indent: 15px; +} +.switchbutton-off{ + left: calc(100% - 15px); +} +.switchbutton-handle{ + width: 30px; + left: auto; + right: 0; + z-index: 9; +} +.switchbutton-inner{ + transition: all 200ms ease-out; + overflow: visible; + position: absolute; + width: 100%; + top: -1px; + bottom: -1px; + left: calc(-100% + 30px); + right: auto; +} +.switchbutton-checked .switchbutton-inner{ + left: 0; +} +.draggable-reverting{ + transition: all 200ms ease-out; +} +.slider-h .slider-tip{ + transform: translateX(-50%); +} +.slider-h .slider-rulelabel span{ + transform: translateX(-50%); +} +.slider-v .slider-tip{ + margin-top: 0; + transform: translate(-100%,-50%); +} +.slider-v .slider-rulelabel span{ + transform: translateY(-50%); +} +.slider-v .slider-inner{ + height: auto; +} + + +.panel{ + position:relative; +} +.panel-title{ + height: 20px; + line-height: 20px; +} +.panel-footer-fixed{ + position:absolute; + width:100%; + bottom:0; +} +.window{ + position: absolute; +} +.window-mask{ + position: fixed; +} +.window .window-footer{ + top: 0; +} +.dialog-toolbar{ + border-width: 0 0 1px 0; +} +.dialog-button{ + border-width: 1px 0 0 0; + top: 0; +} + +.tabs{ + width: 100%; + height: auto; +} +.tabs-scrollable{ + transition: left 400ms, right 400ms; + position: absolute; + width: auto; + height: 100%; + left: 0; + top: 0; +} +.tabs li{ + display: inherit; +} +.tabs li .tabs-inner{ + height: auto; + line-height: normal; + display: inherit; + overflow: hidden; +} +.tabs-title{ + display: inherit; + align-items: center; + line-height: normal; +} +.tabs-close{ + outline: none; +} +.tabs-scroller-left,.tabs-scroller-right{ + position: relative; + display: block; + width: 21px; + height: 100%; +} +.tabs-header-left .tabs li{ + right: -1px; +} +.tabs-header-left .tabs li,.tabs-header-right .tabs li, +.tabs-header-left .tabs li .tabs-inner, +.tabs-header-right .tabs li .tabs-inner{ + display: inherit; +} + +.combo-panel{ + position: absolute; + height: 200px; + z-index: 9999; +} +.combo-panel .tree, +.combo-panel eui-datagrid, +.combo-panel eui-treegrid{ + width: 100%; + height: 100%; +} +.combobox-item{ + padding: 6px 4px; + line-height: 20px; +} +.tagbox.f-field{ + height: auto; +} +.tagbox-labels{ + padding-bottom: 4px; +} +.tagbox-label{ + height: 20px; + line-height: 20px; +} +.tagbox .textbox-text{ + width: 50px; + max-width: 100%; + margin-top: 4px; + padding-top: 0; + padding-bottom: 0; + height: 20px; + line-height: 20px; +} +.tree-editing.tree-title{ + position: relative; + margin: 0; + padding: 0; + height: 26px; + line-height: 26px; + overflow: hidden; +} +.tree-editing.tree-title > *{ + flex: 1 1 auto; + height: auto; + overflow: hidden; +} +.tree-editing.tree-title .textbox-text{ + height: 24px; + line-height: 24px; +} +.datagrid, +.datagrid-view,.datagrid-view1,.datagrid-view2{ + position: relative; +} +.datagrid-vbody{ + overflow: hidden; +} +.datagrid-view3{ + margin-left: -1px; +} +.datagrid-view3 .datagrid-body{ + overflow: hidden; +} +.datagrid-view3 .datagrid-body-inner{ + padding-bottom: 20px; +} +.datagrid-view3 .datagrid-header td, +.datagrid-view3 .datagrid-body td, +.datagrid-view3 .datagrid-footer td { + border-width: 0 0 1px 1px; +} +.datagrid-htable,.datagrid-btable,.datagrid-ftable{ + table-layout: fixed; + width: 100%; +} +.datagrid-htable{ + height: 100%; +} +.datagrid-header .datagrid-header, +.datagrid-footer .datagrid-header{ + border-width: 0 0 0 1px; +} +.datagrid-header-inner,.datagrid-footer-inner{ + overflow: hidden; +} +.datagrid-header-row, .datagrid-row{ + height: 32px; +} +.datagrid-header td.datagrid-field-td{ + border-bottom: 0; +} +.datagrid-cell{ + text-align: left; + height: auto; + font-size: inherit; +} +.datagrid-cell-group{ + text-align: center; +} +.datagrid .datagrid-pager{ + padding: 2px 4px; + display: inherit; +} +.datagrid-loading{ + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + justify-content: center; + align-items: center; +} +.datagrid-mask{ + display: block; +} +.datagrid-mask-msg{ + display: block; + position: static; + line-height: 36px; + height: 40px; + margin: 0; + padding: 0 5px 0 30px; + z-index: 9; +} +.datagrid-body .datagrid-td-group{ + border-left-color: transparent; + border-right-color: transparent; +} +.datagrid-group-expander{ + cursor: pointer; +} +.datagrid-row-expander{ + display: inline-block; + width: 16px; + height: 18px; + cursor: pointer; +} +.datagrid-group-title{ + align-self: center; + padding: 0 4px; + white-space: nowrap; + word-break: normal; + position: relative; +} +.datagrid-editable> .f-field, +.datagrid-editable> *{ + width: 100%; + height: 31px; +} +.datagrid-editable .textbox, .datagrid-editable .textbox-text{ + border-radius: 0; +} +.datagrid-filter-row .textbox{ + border-radius: 0; +} +.datagrid-filter-c{ + padding: 4px; + height: 38px; +} +.datagrid-filter-c> .f-field, +.datagrid-filter-c> *{ + height: 30px; +} +.datagrid-filter-c .datagrid-editable-input{ + width: 100%; +} +.datagrid-filter-btn{ + width: 30px; +} +.datagrid-filter-btn .textbox-icon{ + width: 28px; +} +.datagrid-filter-btn .textbox{ + background-color: transparent; +} +.datagrid-filter-btn-left{ + margin-right: 4px; +} +.datagrid-filter-btn-right{ + margin-left: 4px; +} + +.menu-inline{ + position: relative; + display: inline; + margin: 0; + padding: 0; +} +.menu-inline> .menu-container{ + position: relative; +} +.menu-container{ + position: absolute; + left: 0; + top: 0; + min-width: 200px; +} +.menu{ + overflow: visible; +} +.menu-shadow{ + width: 100%; + height: 100%; + left: 0; + top: 0; +} +.menu-item{ + overflow: visible; +} +.menu-text{ + height: 32px; + line-height: 32px; + float: none; +} +.menu-line{ + z-index: 9999999; + height: 100%; +} +.menu-active{ + z-index: 99999999; +} + +.progressbar-value{ + overflow: visible; +} + +.searchbox .textbox-button, +.searchbox .textbox-button:hover{ + position: inherit; +} + +.calendar-content{ + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; +} +.calendar-menu{ + position: absolute; + width: 100%; + height: 100%; +} +.calendar-menu-month-inner{ + position: relative; +} + +.radiobutton{ + width: 20px; + height: 20px; +} +.checkbox{ + width: 20px; + height: 20px; +} +.progressbar{ + height: 24px; +} +.pagination1{ + height: 34px; + padding: 2px; +} +.layout{ + height: 100%; +} +.layout-mask{ + left: 0; + top: 0; + width: 100%; + height: 100%; +} +.layout-animate{ + transition: transform 400ms; +} +.layout-panel-north,.layout-panel-south{ + position: absolute; + width: 100%; + left: 0; + top: 0; +} +.layout-panel-south{ + top: auto; + bottom: 0; +} +.layout-panel-west,.layout-panel-east{ + position: absolute; + left: 0; + top: 0; + bottom: 0; +} +.layout-panel-east{ + left: auto; + right: 0; +} +.layout-panel-west.layout-collapsed{ + transform: translate3d(-100%, 0, 0); +} +.layout-panel-east.layout-collapsed{ + transform: translate3d(100%, 0, 0) +} +.layout-panel-north.layout-collapsed{ + transform: translate3d(0, -100%, 0) +} +.layout-panel-south.layout-collapsed{ + transform: translate3d(0, 100%, 0) +} + diff --git a/static/safesite/muban/tm.xlsx b/static/safesite/muban/tm.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..1011ee741f0d733fed06496143c616e827476871 GIT binary patch literal 10684 zcmeHtWmufcvM%lrTr;@4YjD@#?oMzU+%>obx8NQ;xH}Q zvTJy^2Odxm5L+-15ahp;8Q9s;yINai#EnRSGoc4v`X3=zf7p!H0d zvDPPtZJc?3uCdsF>^tU<&3;-DK|)=g8?vL7G;+AI63}#+mkgyfcQSavr0P z-qE{;li;OeaGuqBYBQp3JORG=TaUR{oG<(k2*WWj9ovXcm5Ag&WUIO&TjOO+1ZgU~ z3eLAPv0zQ-_RwNY&zHh$HHv7B zJbfPnB=W{nYvMERgEiU2kCMX-;*}S~C-+JlSbrLt+mbF_bzk<{8%S@ z?6-qN7)}hWm*~_ozB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o8fE~gAoznnLFE#d@c$F#Wm{S%r|`GA{A0r zZc2wJsvVT96t=jj-EL2t(yuK?5Jr|gaxE}9x!u(nJFZnbEWsT}mb3pr%G}?xk?6+9 zrYGTWN>}RgzuWR(SFrzNPQt50oZCk;PCfQ;a37zKneZ3cQ)llgt)U9CS~vp_0@Vou%d_F3r+ZwOwskzw~w5xmSC7rpI%JyXJf zFy(4S_|{N<$3c&^g8A6q-OCk9)Jn%d>u9XQ7b4`_51WVJa+5|8=gD|f3~{J8Ti%6i zn{2>D;+5QZ$z5SHjUoBnew*-hVXl=XJ7By>lud0`?0co zfIC-VK?Us(!@H4B3UcS3|5&IE?Nxry*8Z4YIkxp?Jy5S;Fr00bj zLQwlrj{q4m2PROjptF?B*{|>HxTV|8Jd_Trr}`3pO|TXEH3h2H(8M zUjqL3Wb`E97jSBj@ONtZQ|a^M^u+N?>A_z-KR45VQ}(o5e~l-U*31&&void 0!==arguments[1]?arguments[1]:{},a=document.createElement("canvas"),n=a.getContext("2d"),i=void 0,r=void 0;for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(e[o]=Number(e[o]));if(e.scale){var c=e.scale>0&&e.scale<10?e.scale:1;r=t.width*c,i=t.height*c}else r=e.width||e.height*t.width/t.height||t.width,i=e.height||e.width*t.height/t.width||t.height;switch([5,6,7,8].some(function(t){return t===e.orientation})?(a.height=r,a.width=i):(a.height=i,a.width=r),e.orientation){case 3:n.rotate(180*Math.PI/180),n.drawImage(t,-a.width,-a.height,a.width,a.height);break;case 6:n.rotate(90*Math.PI/180),n.drawImage(t,0,-a.width,a.height,a.width);break;case 8:n.rotate(270*Math.PI/180),n.drawImage(t,-a.height,0,a.height,a.width);break;case 2:n.translate(a.width,0),n.scale(-1,1),n.drawImage(t,0,0,a.width,a.height);break;case 4:n.translate(a.width,0),n.scale(-1,1),n.rotate(180*Math.PI/180),n.drawImage(t,-a.width,-a.height,a.width,a.height);break;case 5:n.translate(a.width,0),n.scale(-1,1),n.rotate(90*Math.PI/180),n.drawImage(t,0,-a.width,a.height,a.width);break;case 7:n.translate(a.width,0),n.scale(-1,1),n.rotate(270*Math.PI/180),n.drawImage(t,-a.height,0,a.height,a.width);break;default:n.drawImage(t,0,0,a.width,a.height)}return a},t.canvastoFile=function(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"image/jpeg";return new Promise(function(n){return t.toBlob(function(t){return n(t)},a,e)})},t.canvastoDataURL=async function(t,a,n){return e(n)||(n="image/jpeg"),t.toDataURL(n,a)},t.filetoDataURL=function(t){return new Promise(function(e){var a=new FileReader;a.onloadend=function(t){return e(t.target.result)},a.readAsDataURL(t)})},t.dataURLtoImage=function(t){return new Promise(function(e,a){var n=new Image;n.onload=function(){return e(n)},n.onerror=function(){return a(new Error("dataURLtoImage(): dataURL is illegal"))},n.src=t})},t.dataURLtoFile=async function(t,a){for(var n=t.split(","),i=n[0].match(/:(.*?);/)[1],r=atob(n[1]),o=r.length,c=new Uint8Array(o);o--;)c[o]=r.charCodeAt(o);return e(a)&&(i=a),new Blob([c],{type:i})},t.downloadFile=function(t,e){var a=document.createElement("a");a.href=window.URL.createObjectURL(t),a.download=e||Date.now().toString(36),document.body.appendChild(a);var n=document.createEvent("MouseEvents");n.initEvent("click",!1,!1),a.dispatchEvent(n),document.body.removeChild(a)},t.compress=async function(a){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(a instanceof Blob))throw new Error("compress(): First arg must be a Blob object or a File object.");if("object"!==(void 0===n?"undefined":_typeof(n))&&(n=Object.assign({quality:n})),n.quality=Number(n.quality),Number.isNaN(n.quality))return a;var i=await t.filetoDataURL(a),r=i.split(",")[0].match(/:(.*?);/)[1],o="image/jpeg";e(n.type)&&(o=n.type,r=n.type);var c=await t.dataURLtoImage(i),u=await t.imagetoCanvas(c,Object.assign({},n)),s=await t.canvastoDataURL(u,n.quality,o);return await t.dataURLtoFile(s,r)},t.compressAccurately=async function(a){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(a instanceof Blob))throw new Error("compressAccurately(): First arg must be a Blob object or a File object.");if("object"!==(void 0===n?"undefined":_typeof(n))&&(n=Object.assign({size:n})),n.size=Number(n.size),Number.isNaN(n.size))return a;if(1024*n.size>a.size)return a;n.accuracy=Number(n.accuracy),(!n.accuracy||n.accuracy<.8||n.accuracy>.99)&&(n.accuracy=.95);var i=n.size*(2-n.accuracy)*1024,r=1024*n.size,o=n.size*n.accuracy*1024,c=await t.filetoDataURL(a),u=c.split(",")[0].match(/:(.*?);/)[1],s="image/jpeg";e(n.type)&&(s=n.type,u=n.type);for(var h=await t.dataURLtoImage(c),d=await t.imagetoCanvas(h,Object.assign({},n)),l=.5,f=void 0,g=[null,null],m=1;m<=7;m++){var w=.75*(f=await t.canvastoDataURL(d,l,s)).length;if(7===m){(iw)&&(f=[f].concat(g).filter(function(t){return t}).sort(function(t,e){return Math.abs(.75*t.length-r)-Math.abs(.75*e.length-r)})[0]);break}if(iw))break;g[0]=f,l+=.5**(m+1)}}var y=await t.dataURLtoFile(f,u);return y.size>a.size?a:y},t}); \ No newline at end of file diff --git a/static/safesite/mystatic/js/util.js b/static/safesite/mystatic/js/util.js index 35f76255..982a2f67 100644 --- a/static/safesite/mystatic/js/util.js +++ b/static/safesite/mystatic/js/util.js @@ -32,6 +32,17 @@ function canvasDataURL(path, obj, callback) { scale = w / h; w = obj.width || w; h = obj.height || (w / scale); + if(w <= h ){ + if(w>640){ + w = 640 + h = w/scale + } + }else{ + if(h>640){ + h=640 + w = h*scale + } + } var quality = 0.7; // 默认图片质量为0.7 //生成canvas var canvas = document.createElement('canvas'); @@ -45,9 +56,9 @@ function canvasDataURL(path, obj, callback) { canvas.setAttributeNode(anh); ctx.drawImage(that, 0, 0, w, h); // 图像质量 - if (obj.quality && obj.quality <= 1 && obj.quality > 0) { - quality = obj.quality; - } + // if (obj.quality && obj.quality <= 1 && obj.quality > 0) { + // quality = obj.quality; + // } // quality值越小,所绘制出的图像越模糊 var base64 = canvas.toDataURL('image/jpeg', quality); // 回调函数返回base64的值 @@ -62,7 +73,6 @@ function convertBase64UrlToBlob(urlData) { } return new Blob([u8arr], { type: mime }); } - //取消上传 function cancleUploadFile() {
用户ID观察人姓名观察记录人姓名 观察部门 行为观察数