From 1b27ccbc5eb8b3f1342f4b7a6c90706b44c858a9 Mon Sep 17 00:00:00 2001 From: liangkun Date: Fri, 30 Jul 2021 18:26:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=87=AA=E8=AF=8A=E6=89=93=E5=8D=A1?= =?UTF-8?q?=E6=94=B9=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PersonnelManagement/EpidemicSituationCopy/form/form.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.html index 3cef3e612..37fa0e321 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.html +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.html @@ -51,7 +51,7 @@
- +
@@ -61,7 +61,7 @@
- +
From 792d387a8779cfee15023776190682b225da6a85 Mon Sep 17 00:00:00 2001 From: liangkun Date: Mon, 2 Aug 2021 18:29:08 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E8=AF=8A?= =?UTF-8?q?=E6=89=93=E5=8D=A1=E5=AF=BC=E5=87=BA=E5=88=97=E8=A1=A8=E5=92=8C?= =?UTF-8?q?=E5=85=B3=E8=81=94=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../www/config/config.js | 16 +- .../EpidemicSituationCopy.js | 4 +- .../EpidemicSituationCopy/form/form.html | 16 +- .../EpidemicSituationCopy/form/form.js | 4 +- .../EpidemicSituationCopyController.cs | 12 + .../EpidemicSituationCopy/FormView.cshtml | 72 +++ .../Views/EpidemicSituationCopy/FormView.js | 587 ++++++++++++++++++ .../Views/EpidemicSituationCopy/Index.cshtml | 4 +- .../Views/EpidemicSituationCopy/Index.js | 16 +- .../EpidemicSituationCopy/IndexAll.cshtml | 42 ++ .../Views/EpidemicSituationCopy/IndexAll.js | 201 ++++++ .../EpidemicSituationCopy/IndexReport.cshtml | 2 +- .../EpidemicSituationCopy/IndexReport.js | 5 +- .../Learun.Application.Web.csproj | 4 + .../EpidemicSituationCopyApi.cs | 2 +- .../EpidemicSituationService.cs | 12 +- 16 files changed, 966 insertions(+), 33 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/FormView.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/FormView.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexAll.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexAll.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js index 17e9e4444..aec0dbc56 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js @@ -1,15 +1,15 @@ -var config = { - webapi: 'http://localhost:8080/', - web: "http://localhost:8082/"//web地址,用于配置logo -}; +// var config = { +// webapi: 'http://localhost:8080/', +// web: "http://localhost:8082/"//web地址,用于配置logo +// }; // var config = { // webapi: 'http://112.230.201.53:31173/', // web:"http://112.230.201.53/:8081/"//web地址,用于配置logo // }; -// var config = { -// webapi: 'http://localhost:31173/', -// web: "http://localhost:20472/"//web地址,用于配置logo -// }; +var config = { + webapi: 'http://localhost:31173/', + web: "http://localhost:20472/"//web地址,用于配置logo +}; //var config = { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/EpidemicSituationCopy.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/EpidemicSituationCopy.js index 0b8e53ed1..e93a33c22 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/EpidemicSituationCopy.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/EpidemicSituationCopy.js @@ -1,4 +1,4 @@ -/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) * Copyright (c) 2013-2018 北京泉江科技有限公司 * 创建人:超级管理员 * 日 期:2020-02-03 14:37 @@ -48,7 +48,7 @@ code: 'EUserType' }); $page.find('#lr_PersonnelManagementEpidemicSituation_btn').on('tap', function () { - learun.nav.go({ path: 'PersonnelManagement/EpidemicSituationCopy/form', title: '新增', type: 'right' }); + learun.nav.go({ path: 'PersonnelManagement/EpidemicSituationCopy/form', title: '每日疫情打卡', type: 'right' }); }); }, lclass: 'lr-list', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.html index 37fa0e321..a7a1e3c8c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.html +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.html @@ -1,4 +1,4 @@ -
+
@@ -7,22 +7,22 @@
-
+
-
+
-
+
- +
@@ -32,18 +32,18 @@
-
+
- +
- +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.js index 25ed7d764..2d5a734e1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/PersonnelManagement/EpidemicSituationCopy/form/form.js @@ -1,4 +1,4 @@ -/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) * Copyright (c) 2013-2018 北京泉江科技有限公司 * 创建人:超级管理员 * 日 期:2020-02-03 14:37 @@ -11,6 +11,7 @@ var page = { isScroll: true, init: function ($page, param) { + learun.layer.loading(true, '正在加载...'); keyValue = param.keyValue; // 添加头部按钮列表 var _html = '\ @@ -363,6 +364,7 @@ $page.find('#Department').parent().show(); $page.find('#StudentSource').parent().hide(); } + learun.layer.loading(false); }, destroy: function (pageinfo) { $header = null; keyValue = ''; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/EpidemicSituationCopyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/EpidemicSituationCopyController.cs index 4aff3901c..346d61469 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/EpidemicSituationCopyController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/EpidemicSituationCopyController.cs @@ -38,6 +38,12 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers return View(); } + [HttpGet] + public ActionResult IndexAll() + { + return View(); + } + /// /// 统计 /// @@ -57,6 +63,12 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers return View(); } + [HttpGet] + public ActionResult FormView() + { + return View(); + } + /// /// 外出原因统计 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/FormView.cshtml new file mode 100644 index 000000000..221b3a036 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/FormView.cshtml @@ -0,0 +1,72 @@ +@{ + ViewBag.Title = "疫情记录"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
填报人员
+
+
+
+
填报时间
+ +
+
+
类别
+
+
+
+
所在部门
+
+
+
+
系专业班级
+ +
+ +
+
健康状况
+
+
+
+
性别
+
+
+
+
家庭住址
+ +
+
+
联系方式
+ +
+
+
当前地址
+ +
+ + +
+
是否外出
+
+
+
+
+
+
+
家人异常
+
+
+
+
+
+
+
疫区人异常
+
+
+
+
+
+ +
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/EpidemicSituationCopy/FormView.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/FormView.js new file mode 100644 index 000000000..5498d45b3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/FormView.js @@ -0,0 +1,587 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2020-02-03 14:37 + * 描 述:疫情记录 + */ +var acceptClick; +var keyValue = request('keyValue'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.bind(); + page.initData(); + }, + bind: function () { + $('#Creater').lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' }); + $('#Department').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' }); + $('#UnitName').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#Type').lrDataItemSelect({ + code: 'EUserType', select: function (item) { + if (item) { + if (item.id == "5") { + $("#Departmentdiv").hide(); + $("#StudentSourcediv").show(); + } else { + $("#StudentSourcediv").hide(); + $("#Departmentdiv").show(); + } + } else { + $("#PeopleDetails").parent().hide(); + } + } + }); + $('#RelationShip').lrDataItemSelect({ code: 'ERelationship' }); + $('#OutReason').lrDataItemSelect({ code: 'OutReason' }); + $('#HealthSituation').lrDataItemSelect({ code: 'EpiHealth' }); + $('#IsOut').lrDataItemSelect({ + code: 'YesOrNoInt', + select: function (item) { + if (item) { + if (item.text == "是") { + $("#PassPlaces").parent().show(); + } else { + $("#PassPlaces").parent().hide(); + } + } else { + $("#PassPlaces").parent().hide(); + } + } + }); + $('#HasFamily').lrDataItemSelect({ + code: 'YesOrNoInt', + select: function (item) { + if (item) { + if (item.text == "是") { + $("#ContactsDetails").parent().show(); + } else { + $("#ContactsDetails").parent().hide(); + } + } else { + $("#ContactsDetails").parent().hide(); + } + } + }); + $('#HasPeople').lrDataItemSelect({ + code: 'YesOrNoInt', + select: function (item) { + if (item) { + if (item.text == "是") { + $("#PeopleDetails").parent().show(); + } else { + $("#PeopleDetails").parent().hide(); + } + } else { + $("#PeopleDetails").parent().hide(); + } + } + }); + $('#Gender').lrDataItemSelect({ code: 'usersex' }); + + $('#Provice').lrDataSourceSelect({ + code: 'DIC_PROVINCE', value: 'pcode', text: 'pname', + select: function (item) { + if (!!item) { + $('#OutArea').lrselectRefresh({ + url: "/DIC_CITY/GetListByProvinceCode", + param: { ProvinceCode: item.pcode }, + value: 'CCODE', + text: 'CNAME' + }); + $('#City').lrselectRefresh({ + url: "", + data: [] + }); + } + } + }); + $('#OutArea').lrselect({ + select: function (item) { + if (!!item) { + $('#City').lrselectRefresh({ + url: top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", + param: { cityCode: item.CCODE }, + value: 'ACODE', + text: 'ANAME' + }); + } + } + }); + $('#City').lrselect(); + $('#Vehicle').lrDataItemSelect({ code: 'Vehicle' }); + $('#PassPlaces').jfGrid({ + headData: [ + + { + label: '类别', name: 'PassType', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (row, $edit) { + }, + datatype: 'dataItem', + code: 'EpiPassType' + } + }, + { + label: '省', name: 'Province', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (row, $edit) { + }, + datatype: 'dataSource', + code: 'DIC_PROVINCE', + op: { + value: 'pcode', + text: 'pname', + title: 'pname' + } + } + }, { + label: '市', name: 'City', width: 100, align: 'left', + formatter: function (value, row, op, $cell) { + var province = row.Province; + var res; + learun.httpSync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { + $.each(data, function (_index, _item) { + if (value == _item.CCODE) { + + res = _item.CNAME; + } + }); + }); + return res; + }, + edit: { + type: 'select', + init: function (row, $self) { + var province = row.Province; + learun.httpAsync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { + var res = []; + $.each(data, function (_index, _item) { + res.push(_item); + }); + $self.lrselectRefresh({ + data: res, + }); + }); + }, + op: { + value: 'CCODE', + text: 'CNAME', + title: 'CNAME', + + } + } + }, + { + label: '区域', name: 'Area', width: 100, align: 'left', + formatter: function (value, row, op, $cell) { + var cityCode = row.City; + var res; + learun.httpSync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { + $.each(data, function (_index, _item) { + if (value == _item.ACODE) { + + res = _item.ANAME; + } + }); + }); + return res; + }, + edit: { + type: 'select', + init: function (row, $edit) { + var cityCode = row.City; + learun.httpAsync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { + var res = []; + $.each(data, function (_index, _item) { + res.push(_item); + }); + $edit.lrselectRefresh({ + data: res, + }); + }); + }, + op: { + value: 'ACODE', + text: 'ANAME', + title: 'ANAME' + } + } + }, + { + label: '详细地址', name: 'Address', width: 100, align: 'left' + , edit: { + type: 'input', + + } + }, + { + label: '时间', name: 'Time', width: 100, align: 'left', edit: { type: 'datatime' } + }, + { + label: '交通工具', name: 'Vehicle', width: 100, align: 'left', edit: { + type: 'select', + init: function (row, $edit) { + }, + datatype: 'dataItem', + code: 'Vehicle' + } + }, + { + label: '班次号', name: 'VehicleNo', width: 100, align: 'left' + , edit: { + type: 'input', + + } + }], + + isMultiselect: true, + isEdit: true, + height: 200 + }); + + $('#ContactsDetails').jfGrid({ + headData: [ + { + label: '名字', name: 'Name', width: 100, align: 'left', + edit: { type: 'input' } + }, + { + label: '性别', name: 'Gender', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (row, $edit) { + }, + datatype: 'dataItem', + code: 'usersex' + } + }, + { + label: '联系方式', name: 'Mobile', width: 100, align: 'left', edit: { type: 'input' } + }, + { + label: '隔离方式', name: 'QTType', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (data, $edit) { + + }, + datatype: 'dataItem', + code: 'QuarantineType' + } + }, + { + label: '省', name: 'Province', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (row, $edit) { + }, + datatype: 'dataSource', + code: 'DIC_PROVINCE', + op: { + value: 'pcode', + text: 'pname', + title: 'pname' + } + } + }, { + label: '市', name: 'City', width: 100, align: 'left', + formatter: function (value, row, op, $cell) { + var province = row.Province; + var res; + learun.httpSync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { + $.each(data, function (_index, _item) { + if (value == _item.CCODE) { + + res = _item.CNAME; + } + }); + }); + return res; + }, + edit: { + type: 'select', + init: function (row, $self) { + var province = row.Province; + learun.httpAsync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { + var res = []; + $.each(data, function (_index, _item) { + res.push(_item); + }); + $self.lrselectRefresh({ + data: res, + }); + }); + }, + op: { + value: 'CCODE', + text: 'CNAME', + title: 'CNAME', + + } + } + }, + { + label: '区域', name: 'Area', width: 100, align: 'left', + formatter: function (value, row, op, $cell) { + var cityCode = row.City; + var res; + learun.httpSync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { + $.each(data, function (_index, _item) { + if (value == _item.ACODE) { + + res = _item.ANAME; + } + }); + }); + return res; + }, + edit: { + type: 'select', + init: function (row, $edit) { + var cityCode = row.City; + learun.httpAsync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { + var res = []; + $.each(data, function (_index, _item) { + res.push(_item); + }); + $edit.lrselectRefresh({ + data: res, + }); + }); + }, + op: { + value: 'ACODE', + text: 'ANAME', + title: 'ANAME' + } + } + }, + { + label: '隔离地点', name: 'QTAddress', width: 100, align: 'left', edit: { type: 'input' } + }, + { + label: '隔离时间', name: 'QTTime', width: 100, align: 'left' + , edit: { + type: 'datatime', + dateformat: '1' + } + }, + { + label: '接触隔离时间', name: 'QTContactTime', width: 100, align: 'left' + , edit: { + type: 'datatime', + dateformat: '1' + } + }, + { + label: '健康状况', name: 'Fever', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (data, $edit) { + + }, + datatype: 'dataItem', + code: 'EpiHealth' + } + }, + ], + + isMultiselect: true, + isEdit: true, + height: 200 + }); + + + $('#PeopleDetails').jfGrid({ + headData: [ + { + label: '名字', name: 'Name', width: 100, align: 'left', + edit: { type: 'input' } + }, + { + label: '性别', name: 'Gender', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (row, $edit) { + }, + datatype: 'dataItem', + code: 'usersex' + } + }, + { + label: '联系方式', name: 'Mobile', width: 100, align: 'left', edit: { type: 'input' } + }, + { + label: '隔离方式', name: 'QTType', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (data, $edit) { + + }, + datatype: 'dataItem', + code: 'QuarantineType' + } + }, + { + label: '省', name: 'Province', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (row, $edit) { + }, + datatype: 'dataSource', + code: 'DIC_PROVINCE', + op: { + value: 'pcode', + text: 'pname', + title: 'pname' + } + } + }, { + label: '市', name: 'City', width: 100, align: 'left', + formatter: function (value, row, op, $cell) { + var province = row.Province; + var res; + learun.httpSync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { + $.each(data, function (_index, _item) { + if (value == _item.CCODE) { + + res = _item.CNAME; + } + }); + }); + return res; + }, + edit: { + type: 'select', + init: function (row, $self) { + var province = row.Province; + learun.httpAsync('GET', '/DIC_CITY/GetListByProvinceCode', { ProvinceCode: province }, function (data) { + var res = []; + $.each(data, function (_index, _item) { + res.push(_item); + }); + $self.lrselectRefresh({ + data: res, + }); + }); + }, + op: { + value: 'CCODE', + text: 'CNAME', + title: 'CNAME', + + } + } + }, + { + label: '区域', name: 'Area', width: 100, align: 'left', + formatter: function (value, row, op, $cell) { + var cityCode = row.City; + var res; + learun.httpSync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { + $.each(data, function (_index, _item) { + if (value == _item.ACODE) { + + res = _item.ANAME; + } + }); + }); + return res; + }, + edit: { + type: 'select', + init: function (row, $edit) { + var cityCode = row.City; + learun.httpAsync('GET', top.$.rootUrl + "/DIC_AREA/GetAreasListByCityCode", { cityCode: cityCode }, function (data) { + var res = []; + $.each(data, function (_index, _item) { + res.push(_item); + }); + $edit.lrselectRefresh({ + data: res, + }); + }); + }, + op: { + value: 'ACODE', + text: 'ANAME', + title: 'ANAME' + } + } + }, + { + label: '隔离地点', name: 'QTAddress', width: 100, align: 'left', edit: { type: 'input' } + }, + { + label: '隔离时间', name: 'QTTime', width: 100, align: 'left' + , edit: { + type: 'datatime', + dateformat: '1' + } + }, + { + label: '接触隔离时间', name: 'QTContactTime', width: 100, align: 'left' + , edit: { + type: 'datatime', + dateformat: '1' + } + }, + { + label: '健康状况', name: 'Fever', width: 100, align: 'left' + , edit: { + type: 'select', + init: function (data, $edit) { + + }, + datatype: 'dataItem', + code: 'EpiHealth' + } + }, + ], + + isMultiselect: true, + isEdit: true, + height: 200 + }); + + + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/PersonnelManagement/EpidemicSituationCopy/GetFormData?keyValue=' + keyValue, function (data) { + for (var id in data) { + if (!!data[id].length && data[id].length > 0) { + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + $('[data-table="' + id + '"]').lrSetFormData(data[id]); + } + } + }); + } + } + }; + // 保存数据 + acceptClick = function (callBack) { + if (!$('body').lrValidform()) { + return false; + } + var postData = {}; + postData.strEntity = JSON.stringify($('[data-table="EpidemicSituation"]').lrGetFormData()); + postData.strcontactsDetailsList = JSON.stringify($('#ContactsDetails').jfGridGet('rowdatas')); + postData.passPlaceDetailsList = JSON.stringify($('#PassPlaces').jfGridGet('rowdatas')); + postData.strpeopleDetailsList = JSON.stringify($('#PeopleDetails').jfGridGet('rowdatas')); + + $.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/EpidemicSituationCopy/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.cshtml index 10d01d354..5ddf67344 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.cshtml @@ -12,10 +12,10 @@
- diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.js index 78becc06f..f1f514c79 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/Index.js @@ -51,6 +51,19 @@ var bootstrap = function ($, learun) { }); } }); + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'FormView', + title: '查看', + url: top.$.rootUrl + '/PersonnelManagement/EpidemicSituationCopy/FormView?keyValue=' + keyValue, + width: 1000, + height: 650, + btn: null + }); + } + }); // 删除 $('#lr_delete').on('click', function () { @@ -104,7 +117,7 @@ var bootstrap = function ($, learun) { } }, { - label: "所在部门", name: "Department", width: 100, align: "left", + label: "所在部门/班级", name: "Department", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { console.log(row); if (row.StudentSource) { @@ -203,7 +216,6 @@ var bootstrap = function ($, learun) { search: function (param) { param = param || {}; var loginInfo = top.learun.clientdata.get(['userinfo']); - console.log('人员id' + createrID); if (createrID) { param.Creater = createrID; } else { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexAll.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexAll.cshtml new file mode 100644 index 000000000..1d66deb10 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexAll.cshtml @@ -0,0 +1,42 @@ +@{ + ViewBag.Title = "疫情记录"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
填表人员
+ +
+
+
类别
+
+
+ @*
+
系|专业|班级
+ +
*@ +
+
+
+
+
+
+ +
+
+  查看 +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexAll.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexAll.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexAll.js new file mode 100644 index 000000000..21a3269d7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexAll.js @@ -0,0 +1,201 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2020-02-03 14:37 + * 描 述:疫情记录 + */ +var refreshGirdData; +var createrID = request('createrID'); +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#Type').lrDataItemSelect({ code: 'EUserType' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + + $('#lr_view').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('ID'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'FormView', + title: '查看', + url: top.$.rootUrl + '/PersonnelManagement/EpidemicSituationCopy/FormView?keyValue=' + keyValue, + width: 1000, + height: 650, + btn: null + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/PersonnelManagement/EpidemicSituation/GetPageList', + headData: [ + { + label: "填表人员", name: "Creater", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + + } + }, + { + label: "填报日期", name: "CreateTime", width: 100, align: "left", + formatter: function (value, row) { + return dateFormat("YYYY-mm-dd", new Date(value)); + } + }, + { + label: "类别", name: "Type", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'EUserType', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { + label: "所在部门/班级", name: "Department", width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + if (row.StudentSource) { + callback(row.StudentSource); + } else { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: value, + keyId: 'id', + callback: function (_data) { + callback(_data['name']); + } + }); + } + } + }, + { + label: "性别", name: "Gender", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'usersex', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + { label: "家庭住址", name: "HomeAddress", width: 100, align: "left" }, + { + label: "健康状况", name: "HealthSituation", width: 100, align: "left", + //formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'EpiHealth', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + //} + formatter: function (cellvalue, row) { + if (cellvalue == 0) { + return '健康'; + } else if (cellvalue == 1) { + return '异常'; + } + } + }, + { + label: "是否外出", name: "IsOut", width: 100, align: "left", + //formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'YesOrNoInt', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + //} + formatter: function (cellvalue, row) { + if (cellvalue === 0) { + return ''; + } else if (cellvalue === 1) { + return ''; + } + } + }, + { + label: "家人异常", name: "HasFamily", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === 0) { + return ''; + } else if (cellvalue === 1) { + return ''; + } + } + }, + { + label: "疫区人异常", name: "HasPeople", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue === 0) { + return ''; + } else if (cellvalue === 1) { + return ''; + } + } + }, + { label: "联系方式", name: "Mobile", width: 100, align: "left" }, + { label: "当前地址", name: "Objective", width: 100, align: "left" } + ], + mainId: 'ID', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} +function dateFormat(fmt, date) { + let ret; + const opt = { + "Y+": date.getFullYear().toString(), // 年 + "m+": (date.getMonth() + 1).toString(), // 月 + "d+": date.getDate().toString(), // 日 + "H+": date.getHours().toString(), // 时 + "M+": date.getMinutes().toString(), // 分 + "S+": date.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; +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.cshtml index 19d677a58..ecc2dc562 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.cshtml @@ -12,7 +12,7 @@
填表人员
-
+
类别
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.js index a40972104..20a42daeb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/EpidemicSituationCopy/IndexReport.js @@ -20,7 +20,6 @@ var bootstrap = function ($, learun) { page.search(queryJson); }, 220, 400); $('#Type').lrDataItemSelect({ code: 'EUserType' }); - $('#Creater').lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -35,6 +34,7 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/PersonnelManagement/EpidemicSituationCopy/Index?createrID=' + createrID, width: '80%', height: '80%', + btn: null }); } }); @@ -72,9 +72,8 @@ var bootstrap = function ($, learun) { } }, { - label: "所在部门", name: "Department", width: 100, align: "left", + label: "所在部门/班级", name: "Department", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { - console.log(row); if (row.StudentSource) { callback(row.StudentSource); } else { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index f74fea5ea..25f1f5312 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1367,6 +1367,8 @@ + + @@ -6968,6 +6970,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/EpidemicSituationCopyApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/EpidemicSituationCopyApi.cs index 0d97b9fca..3e05b7948 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/EpidemicSituationCopyApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/EpidemicSituationCopyApi.cs @@ -144,7 +144,7 @@ namespace Learun.Application.WebApi var userId = entity.Creater; if (epidemicSituationIBLL.HasTodayValue(userId)) { - return Success("不能重复提交"); + return Fail("不能重复提交"); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EpidemicSituation/EpidemicSituationService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EpidemicSituation/EpidemicSituationService.cs index 26e75c01f..0a6d656d6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EpidemicSituation/EpidemicSituationService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/EpidemicSituation/EpidemicSituationService.cs @@ -6,6 +6,8 @@ using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; +using Learun.Application.Organization; +using Learun.Application.TwoDevelopment.EducationalAdministration; namespace Learun.Application.TwoDevelopment.PersonnelManagement { @@ -62,15 +64,15 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement t.StudentSource, t.Contacts "); - strSql.Append(" FROM EpidemicSituation t "); + strSql.Append(" FROM EpidemicSituation t left join "+ BaseRepository().getDbConnection().Database+ ".dbo.LR_Base_User b on t.Creater=b.F_UserId left join stuinfobasic c on b.F_EnCode=c.stuno "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); if (!queryParam["Creater"].IsEmpty()) { - dp.Add("Creater", queryParam["Creater"].ToString(), DbType.String); - strSql.Append(" AND t.Creater = @Creater "); + dp.Add("Creater", "%"+queryParam["Creater"].ToString()+"%", DbType.String); + strSql.Append(" AND c.StuName like @Creater "); } if (!queryParam["Type"].IsEmpty()) { @@ -145,14 +147,14 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } - var expression = LinqExtensions.True(); var queryParam = queryJson.ToJObject(); // 填表人员 if (!queryParam["Creater"].IsEmpty()) { string Creater = queryParam["Creater"].ToString(); - expression = expression.And(t => t.Creater.Equals(Creater)); + var studentlist = BaseRepository().FindList(m=>m.F_RealName.Contains(Creater)); + expression = expression.And(t => studentlist.Any(m=>m.F_UserId== t.Creater)); } // 类别 if (!queryParam["Type"].IsEmpty())