|
@@ -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();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+})
|