|
- /* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
- * Copyright (c) 2013-2018 北京泉江科技有限公司
- * 创建人:超级管理员
- * 日 期:2020-02-10 19:21
- * 描 述:疫情接触外人
- */
- var selectedRow;
- var refreshGirdData;
- var bootstrap = function ($, learun) {
- "use strict";
- var page = {
- init: function () {
- page.initGird();
- page.bind();
- },
- bind: function () {
- // 查询
- $('#btn_Search').on('click', function () {
- var keyword = $('#txt_Keyword').val();
- page.search({ keyword: keyword });
- });
- // 刷新
- $('#lr_refresh').on('click', function () {
- location.reload();
- });
- // 新增
- $('#lr_add').on('click', function () {
- selectedRow = null;
- learun.layerForm({
- id: 'form',
- title: '新增',
- url: top.$.rootUrl + '/PersonnelManagement/EpiPeopleDetails/Form',
- width: 700,
- height: 400,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- });
- // 编辑
- $('#lr_edit').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('ID');
- selectedRow = $('#gridtable').jfGridGet('rowdata');
- if (learun.checkrow(keyValue)) {
- learun.layerForm({
- id: 'form',
- title: '编辑',
- url: top.$.rootUrl + '/PersonnelManagement/EpiPeopleDetails/Form?keyValue=' + keyValue,
- width: 700,
- height: 400,
- callBack: function (id) {
- return top[id].acceptClick(refreshGirdData);
- }
- });
- }
- });
- // 删除
- $('#lr_delete').on('click', function () {
- var keyValue = $('#gridtable').jfGridValue('ID');
- if (learun.checkrow(keyValue)) {
- learun.layerConfirm('是否确认删除该项!', function (res) {
- if (res) {
- learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/EpiPeopleDetails/DeleteForm', { keyValue: keyValue}, function () {
- });
- }
- });
- }
- });
- },
- initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
- url: top.$.rootUrl + '/PersonnelManagement/EpiPeopleDetails/GetPageList',
- headData: [
- { label: '编号', name: 'ID', width: 200, align: "left" },
- { label: '姓名', name: 'Name', width: 200, align: "left" },
- { label: '性别', name: 'Gender', width: 200, align: "left" },
- { label: '联系方式', name: 'Mobile', width: 200, align: "left" },
- { label: '隔离方式', name: 'QTType', width: 200, align: "left" },
- { label: '隔离地点', name: 'QTAddress', width: 200, align: "left" },
- { label: '隔离时间', name: 'QTTime', width: 200, align: "left" },
- { label: '接触隔离时间', name: 'QTContactTime', width: 200, align: "left" },
- { label: '异常表现', name: 'Fever', width: 200, align: "left" },
- { label: '主表ID', name: 'EID', width: 200, align: "left" },
- { label: '省', name: 'Province', width: 200, align: "left" },
- { label: '市', name: 'City', width: 200, align: "left" },
- { label: '区', name: 'Area', width: 200, 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();
- }
|