Jelajahi Sumber

清除cookie登录失效后刷新验证码请求无法显示的问题

EDZ 4 tahun lalu
induk
melakukan
4bc5b92d66

+ 25 - 0
src/main/webapp/static/js/basics/basicspersonnel/add.js

@@ -0,0 +1,25 @@
+/**
+ * 新增-基础人员档案js
+ */
+var vm = new Vue({
+	el:'#dpLTE',
+	data: {
+		basicsPersonnel: {
+			id: 0
+		}
+	},
+	methods : {
+		acceptClick: function() {
+			if (!$('#form').Validform()) {
+		        return false;
+		    }
+		    $.SaveForm({
+		    	url: '../../basics/personnel/save?_' + $.now(),
+		    	param: vm.basicsPersonnel,
+		    	success: function(data) {
+		    		$.currentIframe().vm.load();
+		    	}
+		    });
+		}
+	}
+})

+ 34 - 0
src/main/webapp/static/js/basics/basicspersonnel/edit.js

@@ -0,0 +1,34 @@
+/**
+ * 编辑-基础人员档案js
+ */
+var vm = new Vue({
+	el:'#dpLTE',
+	data: {
+		basicsPersonnel: {
+			id: 0
+		}
+	},
+	methods : {
+		setForm: function() {
+			$.SetForm({
+				url: '../../basics/personnel/info?_' + $.now(),
+		    	param: vm.basicsPersonnel.id,
+		    	success: function(data) {
+		    		vm.basicsPersonnel = data;
+		    	}
+			});
+		},
+		acceptClick: function() {
+			if (!$('#form').Validform()) {
+		        return false;
+		    }
+		    $.ConfirmForm({
+		    	url: '../../basics/personnel/update?_' + $.now(),
+		    	param: vm.basicsPersonnel,
+		    	success: function(data) {
+		    		$.currentIframe().vm.load();
+		    	}
+		    });
+		}
+	}
+})

+ 107 - 0
src/main/webapp/static/js/basics/basicspersonnel/list.js

@@ -0,0 +1,107 @@
+/**
+ * 基础人员档案js
+ */
+
+$(function () {
+	initialPage();
+	getGrid();
+});
+
+function initialPage() {
+	$(window).resize(function() {
+		$('#dataGrid').bootstrapTable('resetView', {height: $(window).height()-56});
+	});
+}
+
+function getGrid() {
+	$('#dataGrid').bootstrapTableEx({
+		url: '../../basics/personnel/list?_' + $.now(),
+		height: $(window).height()-56,
+		queryParams: function(params){
+			params.name = vm.keyword;
+			return params;
+		},
+		columns: [
+			{checkbox: true},
+            {field : "jobNumber", title : "工号", width : "100px"},
+            {field : "name", title : "姓名", width : "100px"},
+            {field : "selfDepartment", title : "本部", width : "100px"},
+            {field : "department", title : "部", width : "100px"},
+            {field : "course", title : "课", width : "100px"},
+            {field : "series", title : "系", width : "100px"},
+            {field : "classes", title : "班次", width : "100px"},
+            // {field : "status", title : "提交状态", width : "100px"},
+            {field : "remark", title : "备注", width : "100px"},
+            {title : "操作", formatter : function(value, row, index) {
+                    var _html = '';
+                    if (hasPermission('basics:personnel:edit')) {
+                        _html += '<a href="javascript:;" onclick="vm.edit(\''+row.id+'\')" title="编辑"><i class="fa fa-pencil"></i></a>';
+                    }
+                    if (hasPermission('basics:personnel:remove')) {
+                        _html += '<a href="javascript:;" onclick="vm.remove(false,\''+row.id+'\')" title="删除"><i class="fa fa-trash-o"></i></a>';
+                    }
+                    return _html;
+                }
+            }
+		]
+	})
+}
+
+var vm = new Vue({
+	el:'#dpLTE',
+	data: {
+		keyword: null
+	},
+	methods : {
+		load: function() {
+			$('#dataGrid').bootstrapTable('refresh');
+		},
+		save: function() {
+			dialogOpen({
+				title: '新增基础人员档案',
+				url: 'basics/basicspersonnel/add.html?_' + $.now(),
+                width: '50%',
+                height: '75%',
+				yes : function(iframeId) {
+					top.frames[iframeId].vm.acceptClick();
+				},
+			});
+		},
+		edit: function(id) {
+            dialogOpen({
+                title: '编辑基础人员档案',
+                url: 'basics/basicspersonnel/edit.html?_' + $.now(),
+                width: '50%',
+                height: '75%',
+                success: function(iframeId){
+                    top.frames[iframeId].vm.basicsPersonnel.id = id;
+                    top.frames[iframeId].vm.setForm();
+                },
+                yes: function(iframeId){
+                    top.frames[iframeId].vm.acceptClick();
+                }
+            });
+        },
+        remove: function(batch, id) {
+            var ids = [];
+            if (batch) {
+                var ck = $('#dataGrid').bootstrapTable('getSelections');
+                if (!checkedArray(ck)) {
+                    return false;
+                }
+                $.each(ck, function(idx, item){
+                    ids[idx] = item.id;
+                });
+            } else {
+                ids.push(id);
+            }
+            $.RemoveForm({
+                url: '../../basics/personnel/remove?_' + $.now(),
+                param: ids,
+                success: function(data) {
+                    vm.load();
+                }
+            });
+        }
+	}
+})

+ 25 - 0
src/main/webapp/static/js/basics/basicspersonnelfillin/add.js

@@ -0,0 +1,25 @@
+/**
+ * 新增-人员每日填报温度信息js
+ */
+var vm = new Vue({
+	el:'#dpLTE',
+	data: {
+		basicsPersonnelFillin: {
+			id: 0
+		}
+	},
+	methods : {
+		acceptClick: function() {
+			if (!$('#form').Validform()) {
+		        return false;
+		    }
+		    $.SaveForm({
+		    	url: '../../basics/personnel/fillin/save?_' + $.now(),
+		    	param: vm.basicsPersonnelFillin,
+		    	success: function(data) {
+		    		$.currentIframe().vm.load();
+		    	}
+		    });
+		}
+	}
+})

+ 34 - 0
src/main/webapp/static/js/basics/basicspersonnelfillin/edit.js

@@ -0,0 +1,34 @@
+/**
+ * 编辑-人员每日填报温度信息js
+ */
+var vm = new Vue({
+	el:'#dpLTE',
+	data: {
+		basicsPersonnelFillin: {
+			id: 0
+		}
+	},
+	methods : {
+		setForm: function() {
+			$.SetForm({
+				url: '../../basics/personnel/fillin/info?_' + $.now(),
+		    	param: vm.basicsPersonnelFillin.id,
+		    	success: function(data) {
+		    		vm.basicsPersonnelFillin = data;
+		    	}
+			});
+		},
+		acceptClick: function() {
+			if (!$('#form').Validform()) {
+		        return false;
+		    }
+		    $.ConfirmForm({
+		    	url: '../../basics/personnel/fillin/update?_' + $.now(),
+		    	param: vm.basicsPersonnelFillin,
+		    	success: function(data) {
+		    		$.currentIframe().vm.load();
+		    	}
+		    });
+		}
+	}
+})

+ 131 - 0
src/main/webapp/static/js/basics/basicspersonnelfillin/list.js

@@ -0,0 +1,131 @@
+/**
+ * 人员每日填报温度信息js
+ */
+
+$(function () {
+	initialPage();
+	getGrid();
+});
+
+function initialPage() {
+	$(window).resize(function() {
+		$('#dataGrid').bootstrapTable('resetView', {height: $(window).height()-56});
+	});
+}
+
+function getGrid() {
+	$('#dataGrid').bootstrapTableEx({
+		url: '../../basics/personnel/fillin/list?_' + $.now(),
+		height: $(window).height()-56,
+		queryParams: function(params){
+			params.name = vm.keyword;
+			params.fillingDate = vm.fillingDate;
+			return params;
+		},
+		columns: [
+			{field : "", title : "序号", width : "100px",formatter: function (value, row, index) {
+                    return index + 1;    // 返回每条的序号: 每页条数 *(当前页 - 1 )+ 序号
+            }},
+            {field : "jobNumber", title : "工号", width : "100px"},
+            {field : "name", title : "姓名", width : "100px"},
+            {field : "selfDepartment", title : "本部", width : "100px"},
+            {field : "department", title : "部", width : "100px"},
+            {field : "course", title : "课", width : "100px"},
+            {field : "series", title : "系", width : "100px"},
+            {field : "classes", title : "班次", width : "100px"},
+            {field : "temperature", title : "体温", width : "100px",formatter : function(value , row, index) {
+                    if(value > 37.3){
+                        return "<span style='color: yellow;font-weight: bold'>"+value+"</span>"
+                    }else{
+                        return value;
+                    }
+                }},
+            {field : "ifReturn", title : "是否返沪人员", width : "100px"},
+            {field : "ifStop", title : "有无停留或途径<br/>中高风险地区", width : "100px"},
+            {field : "ifContact", title : "有无接触史", width : "100px"},
+            {field : "fillingDate", title : "填报日期", width : "100px",formatter : function(value , row, index) {
+                    if(value == null || value == ''){
+                        return "<span style='color: red'>当日未登记</span>"
+                    }else{
+                        return value;
+                    }
+                }
+            }
+            // {field : "gmtCreate", title : "填报时间", width : "100px"}
+		]
+	})
+}
+
+var vm = new Vue({
+	el:'#dpLTE',
+	data() {
+        let aData = new Date();
+        let getMonth = aData.getMonth() + 1;
+        let nowDate = aData.getDate() + 1;
+        let dateNow = aData.getFullYear() + "-" + (aData.getMonth() + 1) + "-" + aData.getDate();
+        if(getMonth < 10){
+            dateNow = aData.getFullYear() + "-0" + (aData.getMonth() + 1) + "-" + aData.getDate();
+            if(nowDate < 10){
+                dateNow = aData.getFullYear() + "-0" + (aData.getMonth() + 1) + "-0" + aData.getDate();
+            }
+        }
+
+        return {
+            keyword: null,
+            fillingDate:dateNow
+        }
+		// keyword: null,aaa:dateNow
+	},
+	methods : {
+		load: function() {
+			$('#dataGrid').bootstrapTable('refresh');
+		},
+		save: function() {
+			dialogOpen({
+				title: '新增人员每日填报温度信息',
+				url: 'basics/basicspersonnelfillin/add.html?_' + $.now(),
+				width: '420px',
+				height: '350px',
+				yes : function(iframeId) {
+					top.frames[iframeId].vm.acceptClick();
+				},
+			});
+		},
+		edit: function(id) {
+            dialogOpen({
+                title: '编辑人员每日填报温度信息',
+                url: 'basics/basicspersonnelfillin/edit.html?_' + $.now(),
+                width: '420px',
+                height: '350px',
+                success: function(iframeId){
+                    top.frames[iframeId].vm.basicsPersonnelFillin.id = id;
+                    top.frames[iframeId].vm.setForm();
+                },
+                yes: function(iframeId){
+                    top.frames[iframeId].vm.acceptClick();
+                }
+            });
+        },
+        remove: function(batch, id) {
+            var ids = [];
+            if (batch) {
+                var ck = $('#dataGrid').bootstrapTable('getSelections');
+                if (!checkedArray(ck)) {
+                    return false;
+                }
+                $.each(ck, function(idx, item){
+                    ids[idx] = item.id;
+                });
+            } else {
+                ids.push(id);
+            }
+            $.RemoveForm({
+                url: '../../basics/personnel/fillin/remove?_' + $.now(),
+                param: ids,
+                success: function(data) {
+                    vm.load();
+                }
+            });
+        }
+	}
+})