Selaa lähdekoodia

会议管理代码生成

master
zhichao lei 3 vuotta sitten
vanhempi
commit
58ffca48fc
31 muutettua tiedostoa jossa 6012 lisäystä ja 3488 poistoa
  1. +23
    -10
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs
  2. +124
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingSignInRecordController.cs
  3. +20
    -12
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Form.cshtml
  4. +19
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Form.js
  5. +12
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.cshtml
  6. +46
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.js
  7. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingSignInRecord/Form.cshtml
  8. +58
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingSignInRecord/Form.js
  9. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingSignInRecord/Index.cshtml
  10. +118
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingSignInRecord/Index.js
  11. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  12. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
  13. +116
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingManagementApi.cs
  14. +116
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingSignInRecordApi.cs
  15. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  16. +6
    -6
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/MeetingManagementMap.cs
  17. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/MeetingSignInRecordMap.cs
  18. +3551
    -3387
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
  19. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  20. +34
    -9
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs
  21. +34
    -19
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementEntity.cs
  22. +15
    -8
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs
  23. +86
    -16
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs
  24. +149
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordBLL.cs
  25. +70
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordEntity.cs
  26. +56
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordIBLL.cs
  27. +189
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordService.cs
  28. +320
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingManagement/list.vue
  29. +248
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingManagement/single.vue
  30. +280
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingSignInRecord/list.vue
  31. +227
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingSignInRecord/single.vue

+ 23
- 10
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingManagementController.cs Näytä tiedosto

@@ -7,17 +7,17 @@ using System.Collections.Generic;
namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-03-23 15:04
/// 描 述:会议管理
/// 日 期:2021-02-21 10:07
/// 描 述:会议管理
/// </summary>
public class MeetingManagementController : MvcControllerBase
{
private MeetingManagementIBLL meetingManagementIBLL = new MeetingManagementBLL();

#region 视图功能
#region 视图功能

/// <summary>
/// 主页面
@@ -39,11 +39,12 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
}
#endregion

#region 获取数据
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
@@ -62,6 +63,18 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
return Success(jsonData);
}
/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList(string queryJson)
{
var data = meetingManagementIBLL.GetList(queryJson);
return Success(data);
}
/// <summary>
/// 获取表单数据
/// <summary>
/// <returns></returns>
@@ -77,7 +90,7 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
}
#endregion

#region 提交数据
#region 提交数据

/// <summary>
/// 删除实体数据
@@ -101,8 +114,8 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
MeetingManagementEntity entity = strEntity.ToObject<MeetingManagementEntity>();
meetingManagementIBLL.SaveEntity(keyValue,entity);
UserInfo userInfo = LoginUserInfo.Get(); MeetingManagementEntity entity = strEntity.ToObject<MeetingManagementEntity>();
meetingManagementIBLL.SaveEntity(userInfo,keyValue,entity);
return Success("保存成功!");
}
#endregion


+ 124
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Controllers/MeetingSignInRecordController.cs Näytä tiedosto

@@ -0,0 +1,124 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.PersonnelManagement;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-02-21 10:16
/// 描 述:会议签到记录
/// </summary>
public class MeetingSignInRecordController : MvcControllerBase
{
private MeetingSignInRecordIBLL meetingSignInRecordIBLL = new MeetingSignInRecordBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = meetingSignInRecordIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList(string queryJson)
{
var data = meetingSignInRecordIBLL.GetList(queryJson);
return Success(data);
}
/// <summary>
/// 获取表单数据
/// <summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var MeetingSignInRecordData = meetingSignInRecordIBLL.GetMeetingSignInRecordEntity( keyValue );
var jsonData = new {
MeetingSignInRecord = MeetingSignInRecordData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
meetingSignInRecordIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
UserInfo userInfo = LoginUserInfo.Get(); MeetingSignInRecordEntity entity = strEntity.ToObject<MeetingSignInRecordEntity>();
meetingSignInRecordIBLL.SaveEntity(userInfo,keyValue,entity);
return Success("保存成功!");
}
#endregion

}
}

+ 20
- 12
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Form.cshtml Näytä tiedosto

@@ -1,31 +1,39 @@
@{
ViewBag.Title = "会议管理";
ViewBag.Title = "会议管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-12 lr-form-item" data-table="MeetingManagement" >
<div class="lr-form-item-title">会议室<font face="宋体">*</font></div>
<input id="MeetingName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
<div class="lr-form-item-title">会议主题</div>
<input id="MeetingTitle" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="MeetingManagement" >
<div class="lr-form-item-title">预约时间<font face="宋体">*</font></div>
<input id="OrderTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#OrderTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
<div class="lr-form-item-title">会议地点</div>
<div id="MeetingPlace" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="MeetingManagement" >
<div class="lr-form-item-title">使用时间</div>
<input id="UseTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#UseTime').trigger('change'); } })" />
<div class="lr-form-item-title">开始时间</div>
<input id="BeginTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#BeginTime').trigger('change'); } })" />
</div>
<div class="col-xs-12 lr-form-item" data-table="MeetingManagement" >
<div class="lr-form-item-title">纪要记录人</div>
<input id="RecordPerson" type="text" class="form-control" />
<div class="lr-form-item-title">结束时间</div>
<input id="EndTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#EndTime').trigger('change'); } })" />
</div>
<div class="col-xs-12 lr-form-item" data-table="MeetingManagement" >
<div class="lr-form-item-title">会议纪要</div>
<textarea id="Content" class="form-control" style="height:100px;" ></textarea>
<div class="lr-form-item-title">会议记录者</div>
<div id="RecordPerson" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="MeetingManagement" >
<div class="lr-form-item-title">附件</div>
<div class="lr-form-item-title">会议内容</div>
<div id="Content" style="height:200px;"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="MeetingManagement" >
<div class="lr-form-item-title">附件上传</div>
<div id="Files" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="MeetingManagement" >
<div class="lr-form-item-title">申请人</div>
<div id="CreateUser" ></div>
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingManagement/Form.js")

+ 19
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Form.js Näytä tiedosto

@@ -1,8 +1,8 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2020-03-23 15:04
* 描 述:会议管理
* 日 期:2021-02-21 10:07
* 描 述:会议管理
*/
var acceptClick;
var keyValue = request('keyValue');
@@ -15,7 +15,21 @@ var bootstrap = function ($, learun) {
page.initData();
},
bind: function () {
$('#Files').lrUploader();
$('#MeetingPlace').lrDataItemSelect({ code: '' });
$('#RecordPerson').lrformselect({
layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm',
layerUrlW: 400,
layerUrlH: 300,
dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds'
});
var ContentUE = UE.getEditor('Content');
$('#Content')[0].ue = ContentUE; $('#Files').lrUploader();
$('#CreateUser').lrformselect({
layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm',
layerUrlW: 400,
layerUrlH: 300,
dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds'
});
},
initData: function () {
if (!!keyValue) {


+ 12
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.cshtml Näytä tiedosto

@@ -1,5 +1,5 @@
@{
ViewBag.Title = "会议管理";
ViewBag.Title = "会议管理";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
@@ -11,8 +11,16 @@
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">会议室</div>
<input id="MeetingName" type="text" class="form-control" />
<div class="lr-form-item-title">会议主题</div>
<input id="MeetingTitle" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">会议地点</div>
<div id="MeetingPlace"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">申请人</div>
<div id="CreateUser"></div>
</div>
</div>
</div>
@@ -26,6 +34,7 @@
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>


+ 46
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingManagement/Index.js Näytä tiedosto

@@ -1,8 +1,8 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2020-03-23 15:04
* 描 述:会议管理
* 日 期:2021-02-21 10:07
* 描 述:会议管理
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
@@ -16,13 +16,15 @@ var bootstrap = function ($, learun) {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#MeetingPlace').lrDataItemSelect({ code: '' });
$('#CreateUser').lrUserSelect(0);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/PersonnelManagement/MeetingManagement/Form',
@@ -53,7 +55,7 @@ var bootstrap = function ($, learun) {
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/MeetingManagement/DeleteForm', { keyValue: keyValue}, function () {
refreshGirdData();
@@ -62,18 +64,49 @@ var bootstrap = function ($, learun) {
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/PersonnelManagement/MeetingManagement/GetPageList',
headData: [
{ label: "会议室", name: "MeetingName", width: 100, align: "left"},
{ label: "预约时间", name: "OrderTime", width: 130, align: "left"},
{ label: "使用时间", name: "UseTime", width: 130, align: "left"},
{ label: "纪要记录人", name: "RecordPerson", width: 100, align: "left"},
{ label: "会议纪要", name: "Content", width: 100, align: "left"},
{ label: "附件", name: "Files", width: 100, align: "left"},
{ label: "会议主题", name: "MeetingTitle", width: 100, align: "left"},
{ label: "会议地点", name: "MeetingPlace", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: '',
callback: function (_data) {
callback(_data.text);
}
});
}},
{ label: "开始时间", name: "BeginTime", width: 100, align: "left"},
{ label: "结束时间", name: "EndTime", width: 100, align: "left"},
{ label: "申请人", name: "CreateUser", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}},
{ label: "会议记录者", name: "RecordPerson", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}},
{ label: "会议内容", name: "Content", width: 100, align: "left"},
{ label: "附件上传", name: "Files", width: 100, align: "left"},
],
mainId:'Id',
isPage: true
@@ -86,7 +119,7 @@ var bootstrap = function ($, learun) {
}
};
refreshGirdData = function () {
page.search();
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingSignInRecord/Form.cshtml Näytä tiedosto

@@ -0,0 +1,27 @@
@{
ViewBag.Title = "会议签到记录";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-12 lr-form-item" data-table="MeetingSignInRecord" >
<div class="lr-form-item-title">会议</div>
<div id="MeetID" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="MeetingSignInRecord" >
<div class="lr-form-item-title">参与人id</div>
<div id="ParticipantID" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="MeetingSignInRecord" >
<div class="lr-form-item-title">参与人名字</div>
<input id="ParticipantName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="MeetingSignInRecord" >
<div class="lr-form-item-title">是否签到</div>
<div id="IsSignIn" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="MeetingSignInRecord" >
<div class="lr-form-item-title">参加时间</div>
<input id="SignInTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#SignInTime').trigger('change'); } })" />
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingSignInRecord/Form.js")

+ 58
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingSignInRecord/Form.js Näytä tiedosto

@@ -0,0 +1,58 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-02-21 10:16
* 描 述:会议签到记录
*/
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 () {
$('#MeetID').lrDataItemSelect({ code: '' });
$('#ParticipantID').lrformselect({
layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm',
layerUrlW: 400,
layerUrlH: 300,
dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds'
});
$('#IsSignIn').lrDataItemSelect({ code: 'YesOrNoBit' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/PersonnelManagement/MeetingSignInRecord/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 = {
strEntity: JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/PersonnelManagement/MeetingSignInRecord/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingSignInRecord/Index.cshtml Näytä tiedosto

@@ -0,0 +1,27 @@
@{
ViewBag.Title = "会议签到记录";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/PersonnelManagement/Views/MeetingSignInRecord/Index.js")

+ 118
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/MeetingSignInRecord/Index.js Näytä tiedosto

@@ -0,0 +1,118 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-02-21 10:16
* 描 述:会议签到记录
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/PersonnelManagement/MeetingSignInRecord/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/PersonnelManagement/MeetingSignInRecord/Form?keyValue=' + keyValue,
width: 600,
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/MeetingSignInRecord/DeleteForm', { keyValue: keyValue}, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/PersonnelManagement/MeetingSignInRecord/GetPageList',
headData: [
{ label: "会议", name: "MeetID", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: '',
callback: function (_data) {
callback(_data.text);
}
});
}},
{ label: "参与人id", name: "ParticipantID", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}},
{ label: "参与人名字", name: "ParticipantName", width: 100, align: "left"},
{ label: "是否签到", name: "IsSignIn", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'YesOrNoBit',
callback: function (_data) {
callback(_data.text);
}
});
}},
{ label: "参加时间", name: "SignInTime", width: 100, align: "left"},
],
mainId:'ID',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Näytä tiedosto

@@ -793,6 +793,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\StuLeaveManagementController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\EATalentTrainController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\Sys_DefaultPwdConfigController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\MeetingSignInRecordController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -6129,6 +6130,10 @@
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Sys_DefaultPwdConfig\Form.js" />
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\Index.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\LR_Desktop\Models\" />


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj Näytä tiedosto

@@ -272,6 +272,8 @@
<Compile Include="Modules\PersonnelManagement\ContactsDetailsApi.cs" />
<Compile Include="Modules\EducationalAdministration\ThermographyApi.cs" />
<Compile Include="Modules\LogisticsManagement\ADR_RecordApi.cs" />
<Compile Include="Modules\PersonnelManagement\MeetingManagementApi.cs" />
<Compile Include="Modules\PersonnelManagement\MeetingSignInRecordApi.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 116
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingManagementApi.cs Näytä tiedosto

@@ -0,0 +1,116 @@
using Nancy;
using Learun.Util;
using System.Collections.Generic;
using Learun.Application.TwoDevelopment.PersonnelManagement;
namespace Learun.Application.WebApi
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-02-21 10:07
/// 描 述:会议管理
/// </summary>
public class MeetingManagementApi : BaseApi
{
private MeetingManagementIBLL meetingManagementIBLL = new MeetingManagementBLL();

/// <summary>
/// 注册接口
/// <summary>
public MeetingManagementApi()
: base("/learun/adms/PersonnelManagement/MeetingManagement")
{
Get["/pagelist"] = GetPageList;
Get["/list"] = GetList;
Get["/form"] = GetForm;
Post["/delete"] = DeleteForm;
Post["/save"] = SaveForm;
}
#region 获取数据

/// <summary>
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetPageList(dynamic _)
{
ReqPageParam parameter = this.GetReqData<ReqPageParam>();
var data = meetingManagementIBLL.GetPageList(parameter.pagination, parameter.queryJson);
var jsonData = new
{
rows = data,
total = parameter.pagination.total,
page = parameter.pagination.page,
records = parameter.pagination.records
};
return Success(jsonData);
}
/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetList(dynamic _)
{
string queryJson = this.GetReqData();
var data = meetingManagementIBLL.GetList(queryJson);
return Success(data);
}
/// <summary>
/// 获取表单数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetForm(dynamic _)
{
string keyValue = this.GetReqData();
var MeetingManagementData = meetingManagementIBLL.GetMeetingManagementEntity( keyValue );
var jsonData = new {
MeetingManagement = MeetingManagementData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response DeleteForm(dynamic _)
{
string keyValue = this.GetReqData();
meetingManagementIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SaveForm(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
MeetingManagementEntity entity = parameter.strEntity.ToObject<MeetingManagementEntity>();
meetingManagementIBLL.SaveEntity(this.userInfo,parameter.keyValue,entity);
return Success("保存成功!");
}
#endregion

#region 私有类

/// <summary>
/// 表单实体类
/// <summary>
private class ReqFormEntity {
public string keyValue { get; set; }
public string strEntity{ get; set; }
}
#endregion

}
}

+ 116
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingSignInRecordApi.cs Näytä tiedosto

@@ -0,0 +1,116 @@
using Nancy;
using Learun.Util;
using System.Collections.Generic;
using Learun.Application.TwoDevelopment.PersonnelManagement;
namespace Learun.Application.WebApi
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-02-21 10:16
/// 描 述:会议签到记录
/// </summary>
public class MeetingSignInRecordApi : BaseApi
{
private MeetingSignInRecordIBLL meetingSignInRecordIBLL = new MeetingSignInRecordBLL();

/// <summary>
/// 注册接口
/// <summary>
public MeetingSignInRecordApi()
: base("/learun/adms/PersonnelManagement/MeetingSignInRecord")
{
Get["/pagelist"] = GetPageList;
Get["/list"] = GetList;
Get["/form"] = GetForm;
Post["/delete"] = DeleteForm;
Post["/save"] = SaveForm;
}
#region 获取数据

/// <summary>
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetPageList(dynamic _)
{
ReqPageParam parameter = this.GetReqData<ReqPageParam>();
var data = meetingSignInRecordIBLL.GetPageList(parameter.pagination, parameter.queryJson);
var jsonData = new
{
rows = data,
total = parameter.pagination.total,
page = parameter.pagination.page,
records = parameter.pagination.records
};
return Success(jsonData);
}
/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetList(dynamic _)
{
string queryJson = this.GetReqData();
var data = meetingSignInRecordIBLL.GetList(queryJson);
return Success(data);
}
/// <summary>
/// 获取表单数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetForm(dynamic _)
{
string keyValue = this.GetReqData();
var MeetingSignInRecordData = meetingSignInRecordIBLL.GetMeetingSignInRecordEntity( keyValue );
var jsonData = new {
MeetingSignInRecord = MeetingSignInRecordData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response DeleteForm(dynamic _)
{
string keyValue = this.GetReqData();
meetingSignInRecordIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SaveForm(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
MeetingSignInRecordEntity entity = parameter.strEntity.ToObject<MeetingSignInRecordEntity>();
meetingSignInRecordIBLL.SaveEntity(this.userInfo,parameter.keyValue,entity);
return Success("保存成功!");
}
#endregion

#region 私有类

/// <summary>
/// 表单实体类
/// <summary>
private class ReqFormEntity {
public string keyValue { get; set; }
public string strEntity{ get; set; }
}
#endregion

}
}

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Näytä tiedosto

@@ -545,6 +545,7 @@
<Compile Include="EducationalAdministration\StuLeaveManagementMap.cs" />
<Compile Include="EducationalAdministration\EATalentTrainMap.cs" />
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfigMap.cs" />
<Compile Include="PersonnelManagement\MeetingSignInRecordMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 6
- 6
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/MeetingManagementMap.cs Näytä tiedosto

@@ -4,24 +4,24 @@ using System.Data.Entity.ModelConfiguration;
namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-03-23 15:04
/// 描 述:会议管理
/// 日 期:2021-02-21 10:07
/// 描 述:会议管理
/// </summary>
public class MeetingManagementMap : EntityTypeConfiguration<MeetingManagementEntity>
{
public MeetingManagementMap()
{
#region 表、主键
#region 表、主键
//表
this.ToTable("MEETINGMANAGEMENT");
//主键
this.HasKey(t => t.Id);
#endregion

#region 配置关系
#region 配置关系
#endregion
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/PersonnelManagement/MeetingSignInRecordMap.cs Näytä tiedosto

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.PersonnelManagement;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-02-21 10:16
/// 描 述:会议签到记录
/// </summary>
public class MeetingSignInRecordMap : EntityTypeConfiguration<MeetingSignInRecordEntity>
{
public MeetingSignInRecordMap()
{
#region 表、主键
//表
this.ToTable("MEETINGSIGNINRECORD");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 3551
- 3387
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
File diff suppressed because it is too large
Näytä tiedosto


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Näytä tiedosto

@@ -1601,6 +1601,10 @@
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfig\Sys_DefaultPwdConfigService.cs" />
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfig\Sys_DefaultPwdConfigBLL.cs" />
<Compile Include="EducationalAdministration\Sys_DefaultPwdConfig\Sys_DefaultPwdConfigIBLL.cs" />
<Compile Include="PersonnelManagement\MeetingSignInRecord\MeetingSignInRecordEntity.cs" />
<Compile Include="PersonnelManagement\MeetingSignInRecord\MeetingSignInRecordService.cs" />
<Compile Include="PersonnelManagement\MeetingSignInRecord\MeetingSignInRecordBLL.cs" />
<Compile Include="PersonnelManagement\MeetingSignInRecord\MeetingSignInRecordIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 34
- 9
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementBLL.cs Näytä tiedosto

@@ -6,21 +6,22 @@ using System.Collections.Generic;
namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-03-23 15:04
/// 描 述:会议管理
/// 日 期:2021-02-21 10:07
/// 描 述:会议管理
/// </summary>
public class MeetingManagementBLL : MeetingManagementIBLL
{
private MeetingManagementService meetingManagementService = new MeetingManagementService();

#region 获取数据
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<MeetingManagementEntity> GetPageList(Pagination pagination, string queryJson)
@@ -42,6 +43,30 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<MeetingManagementEntity> GetList(string queryJson)
{
try
{
return meetingManagementService.GetList(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取MeetingManagement表实体数据
/// <param name="keyValue">主键</param>
@@ -68,7 +93,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement

#endregion

#region 提交数据
#region 提交数据

/// <summary>
/// 删除实体数据
@@ -99,11 +124,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveEntity(string keyValue, MeetingManagementEntity entity)
public void SaveEntity(UserInfo userInfo, string keyValue, MeetingManagementEntity entity)
{
try
{
meetingManagementService.SaveEntity(keyValue, entity);
meetingManagementService.SaveEntity(userInfo, keyValue, entity);
}
catch (Exception ex)
{


+ 34
- 19
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementEntity.cs Näytä tiedosto

@@ -5,35 +5,40 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-03-23 15:04
/// 描 述:会议管理
/// 日 期:2021-02-21 10:07
/// 描 述:会议管理
/// </summary>
public class MeetingManagementEntity
{
#region 实体成员
#region 实体成员
/// <summary>
/// Id
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 会议
/// 会议主题
/// </summary>
[Column("MEETINGNAME")]
public string MeetingName { get; set; }
[Column("MEETINGTITLE")]
public string MeetingTitle { get; set; }
/// <summary>
/// 预约时间
/// 会议场地
/// </summary>
[Column("MEETINGPLACE")]
public string MeetingPlace { get; set; }
/// <summary>
/// 开始时间
/// </summary>
[Column("ORDERTIME")]
public DateTime? OrderTime { get; set; }
[Column("BEGINTIME")]
public DateTime? BeginTime { get; set; }
/// <summary>
/// 使用时间
/// 结束时间
/// </summary>
[Column("USETIME")]
public DateTime? UseTime { get; set; }
[Column("ENDTIME")]
public DateTime? EndTime { get; set; }
/// <summary>
/// 纪要记录人
/// </summary>
@@ -49,26 +54,36 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// </summary>
[Column("FILES")]
public string Files { get; set; }
/// <summary>
/// 申请人
/// </summary>
[Column("CREATEUSER")]
public string CreateUser { get; set; }
/// <summary>
/// 预约时间
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
#endregion

#region 扩展操作
#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
public void Create(UserInfo userInfo)
{
this.Id = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
public void Modify(string keyValue, UserInfo userInfo)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
#region 扩展字段
#endregion
}
}


+ 15
- 8
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementIBLL.cs Näytä tiedosto

@@ -5,23 +5,30 @@ using System.Collections.Generic;
namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-03-23 15:04
/// 描 述:会议管理
/// 日 期:2021-02-21 10:07
/// 描 述:会议管理
/// </summary>
public interface MeetingManagementIBLL
{
#region 获取数据
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<MeetingManagementEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<MeetingManagementEntity> GetList(string queryJson);
/// <summary>
/// 获取MeetingManagement表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
@@ -29,7 +36,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
MeetingManagementEntity GetMeetingManagementEntity(string keyValue);
#endregion

#region 提交数据
#region 提交数据

/// <summary>
/// 删除实体数据
@@ -42,7 +49,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
void SaveEntity(string keyValue, MeetingManagementEntity entity);
void SaveEntity(UserInfo userInfo, string keyValue, MeetingManagementEntity entity);
#endregion

}


+ 86
- 16
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingManagement/MeetingManagementService.cs Näytä tiedosto

@@ -9,19 +9,20 @@ using System.Text;
namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2020-03-23 15:04
/// 描 述:会议管理
/// 日 期:2021-02-21 10:07
/// 描 述:会议管理
/// </summary>
public class MeetingManagementService : RepositoryFactory
{
#region 获取数据
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<MeetingManagementEntity> GetPageList(Pagination pagination, string queryJson)
@@ -32,9 +33,11 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.MeetingName,
t.OrderTime,
t.UseTime,
t.MeetingTitle,
t.MeetingPlace,
t.BeginTime,
t.EndTime,
t.CreateUser,
t.RecordPerson,
t.Content,
t.Files
@@ -44,10 +47,20 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["MeetingName"].IsEmpty())
if (!queryParam["MeetingTitle"].IsEmpty())
{
dp.Add("MeetingTitle", "%" + queryParam["MeetingTitle"].ToString() + "%", DbType.String);
strSql.Append(" AND t.MeetingTitle Like @MeetingTitle ");
}
if (!queryParam["MeetingPlace"].IsEmpty())
{
dp.Add("MeetingName", "%" + queryParam["MeetingName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.MeetingName Like @MeetingName ");
dp.Add("MeetingPlace",queryParam["MeetingPlace"].ToString(), DbType.String);
strSql.Append(" AND t.MeetingPlace = @MeetingPlace ");
}
if (!queryParam["CreateUser"].IsEmpty())
{
dp.Add("CreateUser",queryParam["CreateUser"].ToString(), DbType.String);
strSql.Append(" AND t.CreateUser = @CreateUser ");
}
return this.BaseRepository("CollegeMIS").FindList<MeetingManagementEntity>(strSql.ToString(),dp, pagination);
}
@@ -64,6 +77,63 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<MeetingManagementEntity> GetList(string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.MeetingTitle,
t.MeetingPlace,
t.BeginTime,
t.EndTime,
t.CreateUser,
t.RecordPerson,
t.Content,
t.Files
");
strSql.Append(" FROM MeetingManagement t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["MeetingTitle"].IsEmpty())
{
dp.Add("MeetingTitle", "%" + queryParam["MeetingTitle"].ToString() + "%", DbType.String);
strSql.Append(" AND t.MeetingTitle Like @MeetingTitle ");
}
if (!queryParam["MeetingPlace"].IsEmpty())
{
dp.Add("MeetingPlace",queryParam["MeetingPlace"].ToString(), DbType.String);
strSql.Append(" AND t.MeetingPlace = @MeetingPlace ");
}
if (!queryParam["CreateUser"].IsEmpty())
{
dp.Add("CreateUser",queryParam["CreateUser"].ToString(), DbType.String);
strSql.Append(" AND t.CreateUser = @CreateUser ");
}
return this.BaseRepository("CollegeMIS").FindList<MeetingManagementEntity>(strSql.ToString(),dp);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取MeetingManagement表实体数据
/// <param name="keyValue">主键</param>
@@ -90,7 +160,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement

#endregion

#region 提交数据
#region 提交数据

/// <summary>
/// 删除实体数据
@@ -121,18 +191,18 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveEntity(string keyValue, MeetingManagementEntity entity)
public void SaveEntity( UserInfo userInfo, string keyValue, MeetingManagementEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
entity.Modify(keyValue,userInfo);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
entity.Create(userInfo);
this.BaseRepository("CollegeMIS").Insert(entity);
}
}


+ 149
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordBLL.cs Näytä tiedosto

@@ -0,0 +1,149 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-02-21 10:16
/// 描 述:会议签到记录
/// </summary>
public class MeetingSignInRecordBLL : MeetingSignInRecordIBLL
{
private MeetingSignInRecordService meetingSignInRecordService = new MeetingSignInRecordService();

#region 获取数据

/// <summary>
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<MeetingSignInRecordEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return meetingSignInRecordService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<MeetingSignInRecordEntity> GetList(string queryJson)
{
try
{
return meetingSignInRecordService.GetList(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取MeetingSignInRecord表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public MeetingSignInRecordEntity GetMeetingSignInRecordEntity(string keyValue)
{
try
{
return meetingSignInRecordService.GetMeetingSignInRecordEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DeleteEntity(string keyValue)
{
try
{
meetingSignInRecordService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveEntity(UserInfo userInfo, string keyValue, MeetingSignInRecordEntity entity)
{
try
{
meetingSignInRecordService.SaveEntity(userInfo, keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 70
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordEntity.cs Näytä tiedosto

@@ -0,0 +1,70 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-02-21 10:16
/// 描 述:会议签到记录
/// </summary>
public class MeetingSignInRecordEntity
{
#region 实体成员
/// <summary>
/// 编号
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 会议id
/// </summary>
[Column("MEETID")]
public string MeetID { get; set; }
/// <summary>
/// 参与人id
/// </summary>
[Column("PARTICIPANTID")]
public string ParticipantID { get; set; }
/// <summary>
/// 参与人名字
/// </summary>
[Column("PARTICIPANTNAME")]
public string ParticipantName { get; set; }
/// <summary>
/// 是否签到
/// </summary>
[Column("ISSIGNIN")]
public bool? IsSignIn { get; set; }
/// <summary>
/// 签到时间
/// </summary>
[Column("SIGNINTIME")]
public DateTime? SignInTime { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create(UserInfo userInfo)
{
this.ID = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue, UserInfo userInfo)
{
this.ID = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 56
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordIBLL.cs Näytä tiedosto

@@ -0,0 +1,56 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-02-21 10:16
/// 描 述:会议签到记录
/// </summary>
public interface MeetingSignInRecordIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<MeetingSignInRecordEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<MeetingSignInRecordEntity> GetList(string queryJson);
/// <summary>
/// 获取MeetingSignInRecord表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
MeetingSignInRecordEntity GetMeetingSignInRecordEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
void SaveEntity(UserInfo userInfo, string keyValue, MeetingSignInRecordEntity entity);
#endregion

}
}

+ 189
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/MeetingSignInRecord/MeetingSignInRecordService.cs Näytä tiedosto

@@ -0,0 +1,189 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-02-21 10:16
/// 描 述:会议签到记录
/// </summary>
public class MeetingSignInRecordService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<MeetingSignInRecordEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.ID,
t.MeetID,
t.ParticipantID,
t.ParticipantName,
t.IsSignIn,
t.SignInTime
");
strSql.Append(" FROM MeetingSignInRecord t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
return this.BaseRepository("CollegeMIS").FindList<MeetingSignInRecordEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<MeetingSignInRecordEntity> GetList(string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.ID,
t.MeetID,
t.ParticipantID,
t.ParticipantName,
t.IsSignIn,
t.SignInTime
");
strSql.Append(" FROM MeetingSignInRecord t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
return this.BaseRepository("CollegeMIS").FindList<MeetingSignInRecordEntity>(strSql.ToString(),dp);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取MeetingSignInRecord表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public MeetingSignInRecordEntity GetMeetingSignInRecordEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<MeetingSignInRecordEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<MeetingSignInRecordEntity>(t=>t.ID == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveEntity( UserInfo userInfo, string keyValue, MeetingSignInRecordEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue,userInfo);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create(userInfo);
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 320
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingManagement/list.vue Näytä tiedosto

@@ -0,0 +1,320 @@
<template>
<view class="page">
<!-- 主列表页 -->
<view :class="sideOpen ? 'show' : ''" class="mainpage" style="padding-top: 80rpx;">
<!-- 顶部条目/分页信息栏 -->
<l-customlist-banner @buttonClick="sideOpen = true">{{ tips }}</l-customlist-banner>

<!-- 滚动列表,跨端支持上拉/下拉 -->
<l-scroll-list v-if="ready" @pullDown="pullDown" @toBottom="fetchList()" ref="list">
<l-customlist :tips="loadState" showTips>
<!-- 单条记录 -->
<view class="customlist-item" v-for="item of list" :key="item.Id">

<view class="customlist-item-field">
<text class="customlist-item-field-title">会议主题:</text>
{{ displayListItem(item, 'MeetingTitle') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">会议地点:</text>
{{ displayListItem(item, 'MeetingPlace') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">开始时间:</text>
{{ displayListItem(item, 'BeginTime') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">结束时间:</text>
{{ displayListItem(item, 'EndTime') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">申请人:</text>
{{ displayListItem(item, 'CreateUser') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">会议记录者:</text>
{{ displayListItem(item, 'RecordPerson') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">会议内容:</text>
{{ displayListItem(item, 'Content') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">附件上传:</text>
{{ displayListItem(item, 'Files') }}
</view>


<l-customlist-action showEdit @edit="action('edit', item.Id)" showDelete @delete="action('delete', item.Id)" @view="action('view', item.Id)" />
</view>
</l-customlist>
</l-scroll-list>
</view>

<!-- 关闭侧边抽屉按钮 -->
<view @click="sideOpen = false" :class="sideOpen ? 'show' : ''" class="sideclose">
<l-icon type="pullright" color="blue" />
</view>

<!-- 侧边栏,用于设置查询条件 -->
<scroll-view :class="sideOpen ? 'show' : ''" class="sidepage" scroll-y>
<view v-if="ready" class="padding">

<l-input
v-model="queryData.MeetingTitle"
@change="searchChange"
title ="会议主题"
placeholder="按会议主题查询"
/>
<l-select
v-model="queryData.MeetingPlace"
@change="searchChange"
:range="dataSource.MeetingPlace"
title ="会议地点"
placeholder="按会议地点查询"
/>
<l-organize-picker
v-model="queryData.CreateUser"
@change="searchChange"
type="user"
title ="申请人"
placeholder="按申请人查询"
/>

<!-- 重置查询条件按钮 -->
<view class="padding-tb">
<l-button @click="reset" line="orange" class="block" block>重置查询条件</l-button>
</view>
</view>
</scroll-view>

<l-customlist-add v-if="!sideOpen" @click="action('add')" />

</view>
</template>


<script>
/*
* 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2021 上海力软信息技术有限公司
* 创建人:超级管理员
* 日 期:2021-02-21 10:07
* 描 述:会议管理
*/

/**
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录:
* { "path": "pages/PersonnelManagement/MeetingManagement/list", "style": { "navigationBarTitleText": "表单列表页" } }
*
* (navigationBarTitleText 字段为本页面的标题文本,可以修改)
* (必须自行操作该步骤,力软代码生成器不会自动帮您修改 /pages.json 文件)
*/
import moment from 'moment'
import get from 'lodash/get'
import set from 'lodash/set'
import pickBy from 'lodash/pickBy'
import mapValues from 'lodash/mapValues'

export default {
data() {
return {
// 数据项的数据类型、结构
scheme: {
MeetingTitle: { type: 'text' },
MeetingPlace: { type: 'select', dataSource: '0' },
BeginTime: { type: 'datetime', dateformat: '0' },
EndTime: { type: 'datetime', dateformat: '0' },
RecordPerson: { type: 'organize', dataType: 'user' },
Content: { type: 'texteditor' },
Files: { type: 'upload' },
CreateUser: { type: 'organize', dataType: 'user' },
},

// 查询条件
searchData: {},
defaultQueryData: {},
queryData: {
MeetingTitle: '',
MeetingPlace: '',
CreateUser: '',
},

// 数据源
dataSource: {
MeetingPlace: [],
},

// 页面相关参数
ready: false,
tips: '加载中...',
loadState: '向下翻以加载更多',
sideOpen: false,

// 列表与分页信息
page: 1,
total: 2,
list: []
}
},

async onLoad() {
await this.init()
},
onUnload() {
this.OFF('PersonnelManagementMeetingManagement-list-change')
},

methods: {
// 页面初始化
async init() {
this.ON('PersonnelManagementMeetingManagement-list-change', this.refreshList)

// 拉取加载列表和数据源
await Promise.all([


() => {}
])
await this.fetchList()
// 初始化查询条件
this.defaultQueryData = this.COPY(this.queryData)
this.ready = true
},

// 拉取列表
async fetchList() {
if (this.page > this.total) { return }

const result = await this.HTTP_GET(
'/PersonnelManagement/MeetingManagement/pagelist',
{
// 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序)
// 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序
pagination: { rows: 10, page: this.page, sidx: 'Id', sord: 'DESC' },
queryJson: JSON.stringify(this.searchData)
},
'加载数据时出错'
)

if (!result) { return }

this.total = result.total
this.page = result.page + 1
this.list = this.list.concat(result.rows)

this.tips = `已加载 ${Math.min(result.page, result.total)} / ${result.total} 页,共 ${result.records} 项`
this.loadState = result.page >= result.total ? '已加载所有项目' : '向下翻以加载更多'
},

// 刷新清空列表
async refreshList() {
this.page = 1
this.total = 2
this.list = []

await this.fetchList()
},

// 列表下拉
pullDown() {
this.refreshList().then(() => {
this.$refs.list.stopPullDown()
})
},

// 设置搜索条件
async searchChange() {
const result = {}

// 将其他查询项添加到查询 JSON 中
const queryObj = pickBy(this.queryData, t => (Array.isArray(t) ? t.length > 0 : t))
Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t)))

this.searchData = result
await this.refreshList()
},

// 点击「清空查询条件」按钮
reset() {
this.queryData = this.COPY(this.defaultQueryData)
this.searchChange()
},

// 点击「编辑」、「查看」、「添加」、「删除」按钮
async action(type, id = '') {
switch (type) {
case 'view':
this.NAV_TO(`./single?type=view&id=${id}`)
return

case 'add':
this.NAV_TO('./single?type=create')
return

case 'edit':
this.NAV_TO(`./single?type=edit&id=${id}`)
return

case 'delete':
if (!(await this.CONFIRM('删除项目', '确定要删除该项吗?', true))) {
return
}

this.HTTP_POST('/PersonnelManagement/MeetingManagement/delete', id, '删除失败').then(success => {
if(!success) { return }
this.TOAST('删除成功', 'success')
this.refreshList()
})
return

default:
return
}
},

// 显示列表中的标题项
displayListItem(item, field) {
const fieldItem = this.scheme[field]
const value = item[field]

switch (fieldItem.type) {
case 'currentInfo':
case 'organize':
return fieldItem.dataType === 'time' ? value : get(this.GET_GLOBAL(fieldItem.dataType), `${value}.name`, '')

case 'radio':
case 'select':
const selectItem = this.dataSource[field].find(t => t.value === String(value))
return get(selectItem, 'text', '')

case 'checkbox':
if (!value || value.split(',').length <= 0) { return '' }
const checkboxItems = value.split(',')
return this.dataSource[field].filter(t => checkboxItems.includes(t.value)).map(t => t.text).join(',')

case 'datetime':
if (!value) { return '' }
return moment(value).format(Number(fieldItem.dateformat) === 0 ? 'YYYY年 M月 D日' : 'YYYY-MM-DD HH:mm')

default: return value === null || value === undefined ? '' : value
}
}

}
}
</script>


<style lang="less" scoped>
@import '~@/common/css/sidepage.less';
@import '~@/common/css/customlist.less';
</style>

+ 248
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingManagement/single.vue Näytä tiedosto

@@ -0,0 +1,248 @@
<template>
<view class="page">
<view v-if="ready">
<l-input
@input="setValue('MeetingManagement.MeetingTitle', $event)"
:value="getValue('MeetingManagement.MeetingTitle')"
:disabled="!edit"
title="会议主题"
/>
<l-select
@input="setValue('MeetingManagement.MeetingPlace', $event)"
:value="getValue('MeetingManagement.MeetingPlace')"
:disabled="!edit"
:range="dataSource.MeetingManagement.MeetingPlace"
title="会议地点"
/>
<l-date-picker
@input="setValue('MeetingManagement.BeginTime', $event)"
:value="getValue('MeetingManagement.BeginTime')"
:disabled="!edit"
title="开始时间"
/>
<l-date-picker
@input="setValue('MeetingManagement.EndTime', $event)"
:value="getValue('MeetingManagement.EndTime')"
:disabled="!edit"
title="结束时间"
/>
<l-organize-picker
@input="setValue('MeetingManagement.RecordPerson', $event)"
:value="getValue('MeetingManagement.RecordPerson')"
:readonly="!edit"
type="user"
title="会议记录者"
/>
<l-textarea
@input="setValue('MeetingManagement.Content', $event)"
:value="getValue('MeetingManagement.Content')"
:readonly="!edit"
title="会议内容"
/>
<l-upload-file
@input="setValue('MeetingManagement.Files', $event)"
:value="getValue('MeetingManagement.Files')"
:readonly="!edit"
:number="9"
title="附件上传"
/>
<l-organize-picker
@input="setValue('MeetingManagement.CreateUser', $event)"
:value="getValue('MeetingManagement.CreateUser')"
:readonly="!edit"
type="user"
title="申请人"
/>
</view>

<view v-if="ready" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;">
<l-button v-if="edit" @click="action('save')" size="lg" color="green" class="block margin-top" block>
提交保存
</l-button>
<l-button v-if="!edit && mode !== 'create'" @click="action('edit')" size="lg" line="orange" class="block margin-top" block>
编辑本页
</l-button>
<l-button v-if="edit && mode !== 'create'" @click="action('reset')" size="lg" line="red" class="block margin-top" block>
取消编辑
</l-button>
<l-button v-if="!edit && mode !== 'create'" @click="action('delete')" size="lg" line="red" class="block margin-top" block>
删除
</l-button>
</view>
</view>
</template>


<script>
/*
* 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2021 上海力软信息技术有限公司
* 创建人:超级管理员
* 日 期:2021-02-21 10:07
* 描 述:会议管理
*/

/**
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录:
* { "path": "pages/PersonnelManagement/MeetingManagement/single", "style": { "navigationBarTitleText": "表单详情页" } }
*
* (navigationBarTitleText 字段为本页面的标题文本,可以修改)
* (必须自行操作该步骤,力软代码生成器不会自动帮您修改 /pages.json 文件)
*/

import get from 'lodash/get'
import set from 'lodash/set'
import moment from 'moment'
import customPageMixins from '@/common/custompage.js'

export default {
mixins: [customPageMixins],

data() {
return {
// 页面相关参数
id: null,
mode: null,
edit: null,
ready: false,

// 表单数据
current: {},
origin: {},

// 表单项数据结构
scheme: {
MeetingManagement: {
MeetingTitle: { type: 'text', title: '会议主题' },
MeetingPlace: { type: 'select', title: '会议地点', dataSource: '0' },
BeginTime: { type: 'datetime', title: '开始时间', dateformat: '0' },
EndTime: { type: 'datetime', title: '结束时间', dateformat: '0' },
RecordPerson: { type: 'organize', title: '会议记录者', dataType: 'user' },
Content: { type: 'texteditor', title: '会议内容' },
Files: { type: 'upload', title: '附件上传' },
CreateUser: { type: 'organize', title: '申请人', dataType: 'user' },
},

},

// 数据源
dataSource: {
MeetingManagement: {
MeetingPlace: [],
},

}
}
},

async onLoad({ type, id }) {
await this.init(type, id)
},

methods: {
// 页面初始化
async init(type, id) {
this.LOADING('加载数据中...')

this.id = id
this.mode = type
this.edit = ['create', 'edit'].includes(this.mode)

// 拉取表单数据,同时拉取所有来自数据源的选单数据
await Promise.all([


() => {}
])
await this.fetchForm()

this.ready = true
this.HIDE_LOADING()
},

// 加载表单数据
async fetchForm() {
if (this.mode === 'create') {
this.origin = await this.getDefaultForm()
} else {
const result = await this.HTTP_GET('/PersonnelManagement/MeetingManagement/form', this.id)
this.origin = await this.formatFormData(result)
}
this.current = this.COPY(this.origin)
},

// 点击 「编辑」、「重置」、「保存」、「删除」 按钮
async action(type) {
switch (type) {
case 'edit':
this.edit = true
break

case 'reset':
this.current = this.COPY(this.origin)
this.edit = false
break

case 'save':
const verifyResult = this.verifyForm()
if (verifyResult.length > 0) {
this.CONFIRM('表单验证失败', verifyResult.join('\n'))
return
}

if (!(await this.CONFIRM('提交确认', '确定要提交本页表单内容吗?', true))) {
return
}

this.LOADING('正在提交...')
const postData = await this.getPostData(this.id)

this.HTTP_POST('/PersonnelManagement/MeetingManagement/save', postData, '表单提交保存失败').then(success => {
this.HIDE_LOADING()
if (!success) {
return
}

this.EMIT('PersonnelManagementMeetingManagement-list-change')
this.NAV_BACK()
this.TOAST('提交保存成功')
})
break

case 'delete':
if (!(await this.CONFIRM('删除项目', '确定要删除本项吗?', true))) {
return
}

this.LOADING('提交删除中...')
this.HTTP_POST('/PersonnelManagement/MeetingManagement/delete', this.id, '删除失败').then(success => {
this.HIDE_LOADING()
if (!success) {
return
}

this.EMIT('PersonnelManagementMeetingManagement-list-change')
this.NAV_BACK()
this.this.TOAST('删除成功', 'success')
})
break

default: break
}
},

// 获取表单值
getValue(path) {
return get(this.current, path)
},

// 设置表单值
setValue(path, val) {
set(this.current, path, val)
}
}
}
</script>



+ 280
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingSignInRecord/list.vue Näytä tiedosto

@@ -0,0 +1,280 @@
<template>
<view class="page">
<!-- 主列表页 -->
<view :class="sideOpen ? 'show' : ''" class="mainpage" style="padding-top: 80rpx;">
<!-- 顶部条目/分页信息栏 -->
<l-customlist-banner @buttonClick="sideOpen = true">{{ tips }}</l-customlist-banner>

<!-- 滚动列表,跨端支持上拉/下拉 -->
<l-scroll-list v-if="ready" @pullDown="pullDown" @toBottom="fetchList()" ref="list">
<l-customlist :tips="loadState" showTips>
<!-- 单条记录 -->
<view class="customlist-item" v-for="item of list" :key="item.ID">

<view class="customlist-item-field">
<text class="customlist-item-field-title">会议:</text>
{{ displayListItem(item, 'MeetID') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">参与人id:</text>
{{ displayListItem(item, 'ParticipantID') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">参与人名字:</text>
{{ displayListItem(item, 'ParticipantName') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">是否签到:</text>
{{ displayListItem(item, 'IsSignIn') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">参加时间:</text>
{{ displayListItem(item, 'SignInTime') }}
</view>


<l-customlist-action showEdit @edit="action('edit', item.ID)" showDelete @delete="action('delete', item.ID)" @view="action('view', item.ID)" />
</view>
</l-customlist>
</l-scroll-list>
</view>

<!-- 关闭侧边抽屉按钮 -->
<view @click="sideOpen = false" :class="sideOpen ? 'show' : ''" class="sideclose">
<l-icon type="pullright" color="blue" />
</view>

<!-- 侧边栏,用于设置查询条件 -->
<scroll-view :class="sideOpen ? 'show' : ''" class="sidepage" scroll-y>
<view v-if="ready" class="padding">


<!-- 重置查询条件按钮 -->
<view class="padding-tb">
<l-button @click="reset" line="orange" class="block" block>重置查询条件</l-button>
</view>
</view>
</scroll-view>

<l-customlist-add v-if="!sideOpen" @click="action('add')" />

</view>
</template>


<script>
/*
* 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2021 上海力软信息技术有限公司
* 创建人:超级管理员
* 日 期:2021-02-21 10:16
* 描 述:会议签到记录
*/

/**
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录:
* { "path": "pages/PersonnelManagement/MeetingSignInRecord/list", "style": { "navigationBarTitleText": "表单列表页" } }
*
* (navigationBarTitleText 字段为本页面的标题文本,可以修改)
* (必须自行操作该步骤,力软代码生成器不会自动帮您修改 /pages.json 文件)
*/
import moment from 'moment'
import get from 'lodash/get'
import set from 'lodash/set'
import pickBy from 'lodash/pickBy'
import mapValues from 'lodash/mapValues'

export default {
data() {
return {
// 数据项的数据类型、结构
scheme: {
MeetID: { type: 'select', dataSource: '0' },
ParticipantID: { type: 'organize', dataType: 'user' },
ParticipantName: { type: 'text' },
IsSignIn: { type: 'select', itemCode: 'YesOrNoBit', dataSource: '0' },
SignInTime: { type: 'datetime', dateformat: '0' },
},

// 查询条件
searchData: {},
defaultQueryData: {},
queryData: {
},

// 数据源
dataSource: {
MeetID: [],
IsSignIn: Object.values(this.GET_GLOBAL('dataDictionary').YesOrNoBit).map(t => ({ value: t.value, text: t.text })),
},

// 页面相关参数
ready: false,
tips: '加载中...',
loadState: '向下翻以加载更多',
sideOpen: false,

// 列表与分页信息
page: 1,
total: 2,
list: []
}
},

async onLoad() {
await this.init()
},
onUnload() {
this.OFF('PersonnelManagementMeetingSignInRecord-list-change')
},

methods: {
// 页面初始化
async init() {
this.ON('PersonnelManagementMeetingSignInRecord-list-change', this.refreshList)

// 拉取加载列表和数据源
await Promise.all([


() => {}
])
await this.fetchList()
// 初始化查询条件
this.defaultQueryData = this.COPY(this.queryData)
this.ready = true
},

// 拉取列表
async fetchList() {
if (this.page > this.total) { return }

const result = await this.HTTP_GET(
'/PersonnelManagement/MeetingSignInRecord/pagelist',
{
// 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序)
// 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序
pagination: { rows: 10, page: this.page, sidx: 'ID', sord: 'DESC' },
queryJson: JSON.stringify(this.searchData)
},
'加载数据时出错'
)

if (!result) { return }

this.total = result.total
this.page = result.page + 1
this.list = this.list.concat(result.rows)

this.tips = `已加载 ${Math.min(result.page, result.total)} / ${result.total} 页,共 ${result.records} 项`
this.loadState = result.page >= result.total ? '已加载所有项目' : '向下翻以加载更多'
},

// 刷新清空列表
async refreshList() {
this.page = 1
this.total = 2
this.list = []

await this.fetchList()
},

// 列表下拉
pullDown() {
this.refreshList().then(() => {
this.$refs.list.stopPullDown()
})
},

// 设置搜索条件
async searchChange() {
const result = {}

// 将其他查询项添加到查询 JSON 中
const queryObj = pickBy(this.queryData, t => (Array.isArray(t) ? t.length > 0 : t))
Object.assign(result, mapValues(queryObj, t => (Array.isArray(t) ? t.join(',') : t)))

this.searchData = result
await this.refreshList()
},

// 点击「清空查询条件」按钮
reset() {
this.queryData = this.COPY(this.defaultQueryData)
this.searchChange()
},

// 点击「编辑」、「查看」、「添加」、「删除」按钮
async action(type, id = '') {
switch (type) {
case 'view':
this.NAV_TO(`./single?type=view&id=${id}`)
return

case 'add':
this.NAV_TO('./single?type=create')
return

case 'edit':
this.NAV_TO(`./single?type=edit&id=${id}`)
return

case 'delete':
if (!(await this.CONFIRM('删除项目', '确定要删除该项吗?', true))) {
return
}

this.HTTP_POST('/PersonnelManagement/MeetingSignInRecord/delete', id, '删除失败').then(success => {
if(!success) { return }
this.TOAST('删除成功', 'success')
this.refreshList()
})
return

default:
return
}
},

// 显示列表中的标题项
displayListItem(item, field) {
const fieldItem = this.scheme[field]
const value = item[field]

switch (fieldItem.type) {
case 'currentInfo':
case 'organize':
return fieldItem.dataType === 'time' ? value : get(this.GET_GLOBAL(fieldItem.dataType), `${value}.name`, '')

case 'radio':
case 'select':
const selectItem = this.dataSource[field].find(t => t.value === String(value))
return get(selectItem, 'text', '')

case 'checkbox':
if (!value || value.split(',').length <= 0) { return '' }
const checkboxItems = value.split(',')
return this.dataSource[field].filter(t => checkboxItems.includes(t.value)).map(t => t.text).join(',')

case 'datetime':
if (!value) { return '' }
return moment(value).format(Number(fieldItem.dateformat) === 0 ? 'YYYY年 M月 D日' : 'YYYY-MM-DD HH:mm')

default: return value === null || value === undefined ? '' : value
}
}

}
}
</script>


<style lang="less" scoped>
@import '~@/common/css/sidepage.less';
@import '~@/common/css/customlist.less';
</style>

+ 227
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingSignInRecord/single.vue Näytä tiedosto

@@ -0,0 +1,227 @@
<template>
<view class="page">
<view v-if="ready">
<l-select
@input="setValue('MeetingSignInRecord.MeetID', $event)"
:value="getValue('MeetingSignInRecord.MeetID')"
:disabled="!edit"
:range="dataSource.MeetingSignInRecord.MeetID"
title="会议"
/>
<l-organize-picker
@input="setValue('MeetingSignInRecord.ParticipantID', $event)"
:value="getValue('MeetingSignInRecord.ParticipantID')"
:readonly="!edit"
type="user"
title="参与人id"
/>
<l-input
@input="setValue('MeetingSignInRecord.ParticipantName', $event)"
:value="getValue('MeetingSignInRecord.ParticipantName')"
:disabled="!edit"
title="参与人名字"
/>
<l-select
@input="setValue('MeetingSignInRecord.IsSignIn', $event)"
:value="getValue('MeetingSignInRecord.IsSignIn')"
:disabled="!edit"
:range="dataSource.MeetingSignInRecord.IsSignIn"
title="是否签到"
/>
<l-date-picker
@input="setValue('MeetingSignInRecord.SignInTime', $event)"
:value="getValue('MeetingSignInRecord.SignInTime')"
:disabled="!edit"
title="参加时间"
/>
</view>

<view v-if="ready" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;">
<l-button v-if="edit" @click="action('save')" size="lg" color="green" class="block margin-top" block>
提交保存
</l-button>
<l-button v-if="!edit && mode !== 'create'" @click="action('edit')" size="lg" line="orange" class="block margin-top" block>
编辑本页
</l-button>
<l-button v-if="edit && mode !== 'create'" @click="action('reset')" size="lg" line="red" class="block margin-top" block>
取消编辑
</l-button>
<l-button v-if="!edit && mode !== 'create'" @click="action('delete')" size="lg" line="red" class="block margin-top" block>
删除
</l-button>
</view>
</view>
</template>


<script>
/*
* 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2021 上海力软信息技术有限公司
* 创建人:超级管理员
* 日 期:2021-02-21 10:16
* 描 述:会议签到记录
*/

/**
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录:
* { "path": "pages/PersonnelManagement/MeetingSignInRecord/single", "style": { "navigationBarTitleText": "表单详情页" } }
*
* (navigationBarTitleText 字段为本页面的标题文本,可以修改)
* (必须自行操作该步骤,力软代码生成器不会自动帮您修改 /pages.json 文件)
*/

import get from 'lodash/get'
import set from 'lodash/set'
import moment from 'moment'
import customPageMixins from '@/common/custompage.js'

export default {
mixins: [customPageMixins],

data() {
return {
// 页面相关参数
id: null,
mode: null,
edit: null,
ready: false,

// 表单数据
current: {},
origin: {},

// 表单项数据结构
scheme: {
MeetingSignInRecord: {
MeetID: { type: 'select', title: '会议', dataSource: '0' },
ParticipantID: { type: 'organize', title: '参与人id', dataType: 'user' },
ParticipantName: { type: 'text', title: '参与人名字' },
IsSignIn: { type: 'select', title: '是否签到', itemCode: 'YesOrNoBit', dataSource: '0' },
SignInTime: { type: 'datetime', title: '参加时间', dateformat: '0' },
},

},

// 数据源
dataSource: {
MeetingSignInRecord: {
MeetID: [],
IsSignIn: Object.values(this.GET_GLOBAL('dataDictionary').YesOrNoBit).map(t => ({ value: t.value, text: t.text })),
},

}
}
},

async onLoad({ type, id }) {
await this.init(type, id)
},

methods: {
// 页面初始化
async init(type, id) {
this.LOADING('加载数据中...')

this.id = id
this.mode = type
this.edit = ['create', 'edit'].includes(this.mode)

// 拉取表单数据,同时拉取所有来自数据源的选单数据
await Promise.all([


() => {}
])
await this.fetchForm()

this.ready = true
this.HIDE_LOADING()
},

// 加载表单数据
async fetchForm() {
if (this.mode === 'create') {
this.origin = await this.getDefaultForm()
} else {
const result = await this.HTTP_GET('/PersonnelManagement/MeetingSignInRecord/form', this.id)
this.origin = await this.formatFormData(result)
}
this.current = this.COPY(this.origin)
},

// 点击 「编辑」、「重置」、「保存」、「删除」 按钮
async action(type) {
switch (type) {
case 'edit':
this.edit = true
break

case 'reset':
this.current = this.COPY(this.origin)
this.edit = false
break

case 'save':
const verifyResult = this.verifyForm()
if (verifyResult.length > 0) {
this.CONFIRM('表单验证失败', verifyResult.join('\n'))
return
}

if (!(await this.CONFIRM('提交确认', '确定要提交本页表单内容吗?', true))) {
return
}

this.LOADING('正在提交...')
const postData = await this.getPostData(this.id)

this.HTTP_POST('/PersonnelManagement/MeetingSignInRecord/save', postData, '表单提交保存失败').then(success => {
this.HIDE_LOADING()
if (!success) {
return
}

this.EMIT('PersonnelManagementMeetingSignInRecord-list-change')
this.NAV_BACK()
this.TOAST('提交保存成功')
})
break

case 'delete':
if (!(await this.CONFIRM('删除项目', '确定要删除本项吗?', true))) {
return
}

this.LOADING('提交删除中...')
this.HTTP_POST('/PersonnelManagement/MeetingSignInRecord/delete', this.id, '删除失败').then(success => {
this.HIDE_LOADING()
if (!success) {
return
}

this.EMIT('PersonnelManagementMeetingSignInRecord-list-change')
this.NAV_BACK()
this.this.TOAST('删除成功', 'success')
})
break

default: break
}
},

// 获取表单值
getValue(path) {
return get(this.current, path)
},

// 设置表单值
setValue(path, val) {
set(this.current, path, val)
}
}
}
</script>



Ladataan…
Peruuta
Tallenna