Browse Source

app2.0:增加班级自诊打卡结果;修改会议管理,我的会议,会议签到记录;会议api增加获取会议场地接口;

yanshi
dyy 2 years ago
parent
commit
caca0e109c
10 changed files with 454 additions and 37 deletions
  1. +13
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingManagementApi.cs
  2. +6
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json
  3. +372
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Thermography/Result/list.vue
  4. +5
    -5
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Thermography/single.vue
  5. +12
    -3
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingManagement/list.vue
  6. +6
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingManagement/single.vue
  7. +10
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingMy/list.vue
  8. +5
    -1
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingMy/single.vue
  9. +11
    -15
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingSignInRecord/list.vue
  10. +14
    -9
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingSignInRecord/single.vue

+ 13
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/PersonnelManagement/MeetingManagementApi.cs View File

@@ -14,6 +14,7 @@ namespace Learun.Application.WebApi
public class MeetingManagementApi : BaseApi
{
private MeetingManagementIBLL meetingManagementIBLL = new MeetingManagementBLL();
private ConferenceRoomIBLL conferenceRoomIBLL = new ConferenceRoomBLL();

/// <summary>
/// 注册接口
@@ -26,6 +27,7 @@ namespace Learun.Application.WebApi
Get["/form"] = GetForm;
Post["/delete"] = DeleteForm;
Post["/save"] = SaveForm;
Get["/conferenceroomlist"] = GetConferenceRoomList;
}
#region 获取数据

@@ -72,6 +74,17 @@ namespace Learun.Application.WebApi
};
return Success(jsonData);
}

/// <summary>
/// 获取会议场地数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetConferenceRoomList(dynamic _)
{
var data = conferenceRoomIBLL.GetList();
return Success(data);
}
#endregion

#region 提交数据


+ 6
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json View File

@@ -388,6 +388,12 @@
"navigationBarTitleText": "详情"
}
},
{
"path": "pages/EducationalAdministration/Thermography/Result/list",
"style": {
"navigationBarTitleText": "班级自诊打卡结果"
}
},
//借阅信息
{
"path": "pages/EducationalAdministration/BookBorrow/list",


+ 372
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Thermography/Result/list.vue View File

@@ -0,0 +1,372 @@
<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, 'ClassNo') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">测温人:</text>
{{ displayListItem(item, 'MeasurerID') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">被测温人学号:</text>
{{ item.PersonBeingMeasured }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">被测温人:</text>
{{ displayListItem(item, 'PersonBeingMeasured') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">状态:</text>
{{ displayListItem(item, 'Status') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">温度:</text>
{{ displayListItem(item, 'Temperature') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">处理结果:</text>
{{ displayListItem(item, 'ProcessingResult') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">备注:</text>
{{ displayListItem(item, 'Remark') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">测量时间:</text>
{{ displayListItem(item, 'MeasureDate') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">测温时间段:</text>
{{ displayListItem(item, 'MeasureTime') }}
</view>


<l-customlist-action showEdit @edit="action('edit', 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-customlist-sidepage-datefilter v-model="dateRange" @change="searchChange" title="按时间日期查询: " ref="datefilter" class="margin-bottom" />

<l-select v-model="queryData.ClassNo" @change="searchChange" :range="dataSource.ClassNo" title="班级" placeholder="按班级查询" />
<l-select v-model="queryData.PersonBeingMeasured" @change="searchChange" :range="dataSource.PersonBeingMeasured" title="被测温人" placeholder="按被测温人查询" />
<l-select v-model="queryData.MeasureTime" @change="searchChange" :range="dataSource.MeasureTime" title="测温时间段" placeholder="按测温时间段查询" />
<l-select v-model="queryData.Status" @change="searchChange" :range="dataSource.Status" 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-2020 上海力软信息技术有限公司
* 创建人:超级管理员
* 日 期:2020-10-12 17:22
* 描 述:班级自诊打卡结果
*/

/**
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录:
* { "path": "pages/EducationalAdministration/Thermography/Result", "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: {
ClassNo: {
type: 'select',
dataSource: '1',
dataSourceId: 'bjsj,classname,classno'
},
MeasurerID: {
type: 'select',
dataSource: '1',
dataSourceId: 'BaseUser,f_realname,f_account'
},
PersonBeingMeasured: {
type: 'select',
dataSource: '1',
dataSourceId: 'StuInfoBasic,stuname,stuno'
},
MeasureDate: { type: 'datetime', dateformat: '0' },
MeasureTime: {
type: 'select',
itemCode: 'MeasureTime',
dataSource: '0'
},
Status: {
type: 'select',
itemCode: 'TemperatureMeasure',
dataSource: '0'
},
Temperature: { type: 'text' },
ProcessingResult: { type: 'textarea' },
Remark: { type: 'textarea' }
},

// 查询条件
searchData: {
},
defaultQueryData: {},
queryData: {
ClassNo: '',
PersonBeingMeasured: '',
MeasureTime: '',
Status: '',
},

// 数据源
dataSource: {
ClassNo: [],
MeasurerID: [],
PersonBeingMeasured: [],
MeasureTime: Object.values(this.GET_GLOBAL('dataDictionary').MeasureTime).map(t => ({ value: t.value, text: t.text })),
Status: Object.values(this.GET_GLOBAL('dataDictionary').TemperatureMeasure).map(t => ({ value: t.value, text: t.text }))
},

// 时间查询参数
dateRange: null,

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

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

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

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

// 拉取加载列表和数据源
await Promise.all([
this.FETCH_DATASOURCE('bjsj').then(data => {
this.dataSource.ClassNo = data.data.map(t => ({
text: t.classname,
value: t.classno
}));
}),
this.FETCH_DATASOURCE('BaseUser').then(data => {
this.dataSource.MeasurerID = data.data.map(t => ({
text: t.f_realname,
value: t.f_account
}));
}),
this.FETCH_DATASOURCE('StuInfoBasic').then(data => {
this.dataSource.PersonBeingMeasured = data.data.map(t => ({
text: t.stuname,
value: t.stuno
}));
}),

() => {}
]);
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(
'learun/adms/EducationalAdministration/Thermography/pagelist',
{
// 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序)
// 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序
pagination: { rows: 10, page: this.page, sidx: 'MeasureDate desc,PersonBeingMeasured', 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 = {};

// 时间查询相关参数
if (this.dateRange) {
result.StartTime = this.dateRange.start;
result.EndTime = this.dateRange.end;
}

// 将其他查询项添加到查询 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.$refs.datefilter.changeDateRange('all');
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('learun/adms/EducationalAdministration/Thermography/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>

+ 5
- 5
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/Thermography/single.vue View File

@@ -4,34 +4,34 @@
<l-select
@input="setValue('Thermography.ClassNo', $event)"
:value="getValue('Thermography.ClassNo')"
:disabled="!edit"
disabled="disabled"
:range="dataSource.Thermography.ClassNo"
title="班级"
/>
<l-select
@input="setValue('Thermography.MeasurerID', $event)"
:value="getValue('Thermography.MeasurerID')"
:disabled="!edit"
disabled="disabled"
:range="dataSource.Thermography.MeasurerID"
title="测温人"
/>
<l-select
@input="setValue('Thermography.PersonBeingMeasured', $event)"
:value="getValue('Thermography.PersonBeingMeasured')"
:disabled="!edit"
disabled="disabled"
:range="dataSource.Thermography.PersonBeingMeasured"
title="被测温人"
/>
<l-date-picker
@input="setValue('Thermography.MeasureDate', $event)"
:value="getValue('Thermography.MeasureDate')"
:disabled="!edit"
disabled="disabled"
title="测量时间"
/>
<l-select
@input="setValue('Thermography.MeasureTime', $event)"
:value="getValue('Thermography.MeasureTime')"
:disabled="!edit"
disabled="disabled"
:range="dataSource.Thermography.MeasureTime"
title="测温时间段"
/>


+ 12
- 3
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingManagement/list.vue View File

@@ -1,4 +1,4 @@
<template>
<template>
<view class="page">
<!-- 主列表页 -->
<view
@@ -204,7 +204,16 @@ export default {
);

// 拉取加载列表和数据源
await Promise.all([() => {}]);
await Promise.all([
this.HTTP_GET("learun/adms/PersonnelManagement/MeetingManagement/conferenceroomlist",{},"获取会议场地出错").then(success=>{
if(success){
this.dataSource.MeetingPlace=success.map(t=>({text:t.Name,value:t.ID}));
}
}),
() => {},
]);
await this.fetchList();
// 初始化查询条件
this.defaultQueryData = this.COPY(this.queryData);
@@ -222,7 +231,7 @@ export default {
{
// 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序)
// 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序
pagination: { rows: 10, page: this.page, sidx: "Id", sord: "DESC" },
pagination: { rows: 10, page: this.page, sidx: "CreateTime desc", sord: "DESC" },
queryJson: JSON.stringify(this.searchData),
},
"加载数据时出错"


+ 6
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingManagement/single.vue View File

@@ -1,4 +1,4 @@
<template>
<template>
<view class="page">
<view v-if="ready">
<l-input
@@ -151,7 +151,11 @@ export default {

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

this.HTTP_GET("learun/adms/PersonnelManagement/MeetingManagement/conferenceroomlist",{},"获取会议场地出错").then(success=>{
if(success){
this.dataSource.MeetingManagement.MeetingPlace=success.map(t=>({text:t.Name,value:t.ID}));
}
}),

() => {}
])


+ 10
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingMy/list.vue View File

@@ -1,4 +1,4 @@
<template>
<template>
<view class="page">
<!-- 主列表页 -->
<view
@@ -204,7 +204,15 @@ export default {
);

// 拉取加载列表和数据源
await Promise.all([() => {}]);
await Promise.all([
this.HTTP_GET("learun/adms/PersonnelManagement/MeetingManagement/conferenceroomlist",{},"获取会议场地出错").then(success=>{
if(success){
this.dataSource.MeetingPlace=success.map(t=>({text:t.Name,value:t.ID}));
}
}),
() => {},
]);
await this.fetchList();
// 初始化查询条件
this.defaultQueryData = this.COPY(this.queryData);


+ 5
- 1
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingMy/single.vue View File

@@ -151,7 +151,11 @@ export default {

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

this.HTTP_GET("learun/adms/PersonnelManagement/MeetingManagement/conferenceroomlist",{},"获取会议场地出错").then(success=>{
if(success){
this.dataSource.MeetingManagement.MeetingPlace=success.map(t=>({text:t.Name,value:t.ID}));
}
}),

() => {}
])


+ 11
- 15
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingSignInRecord/list.vue View File

@@ -1,4 +1,4 @@
<template>
<template>
<view class="page">
<!-- 主列表页 -->
<view :class="sideOpen ? 'show' : ''" class="mainpage" style="padding-top: 80rpx;">
@@ -13,22 +13,17 @@

<view class="customlist-item-field">
<text class="customlist-item-field-title">会议:</text>
{{ displayListItem(item, 'MeetID') }}
{{ displayListItem(item, 'MeetingTitle') }}
</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>
<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') }}
{{ item.IsSignIn==true?"已签到" : "未签到" }}
</view>

<view class="customlist-item-field">
@@ -37,7 +32,7 @@
</view>


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

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

</view>
</template>
@@ -94,8 +89,9 @@ export default {
return {
// 数据项的数据类型、结构
scheme: {
MeetID: { type: 'select', dataSource: '0' },
ParticipantID: { type: 'organize', dataType: 'user' },
MeetingTitle:{type:'text'},
// 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' },
@@ -109,7 +105,7 @@ export default {

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

@@ -159,7 +155,7 @@ export default {
{
// 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序)
// 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序
pagination: { rows: 10, page: this.page, sidx: 'ID', sord: 'DESC' },
pagination: { rows: 10, page: this.page, sidx: 'MeetID,ParticipantID', sord: 'DESC' },
queryJson: JSON.stringify(this.searchData)
},
'加载数据时出错'


+ 14
- 9
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/MeetingSignInRecord/single.vue View File

@@ -1,24 +1,24 @@
<template>
<template>
<view class="page">
<view v-if="ready">
<l-select
@input="setValue('MeetingSignInRecord.MeetID', $event)"
:value="getValue('MeetingSignInRecord.MeetID')"
:disabled="!edit"
disabled="disabled"
:range="dataSource.MeetingSignInRecord.MeetID"
title="会议"
/>
<l-organize-picker
<!-- <l-organize-picker
@input="setValue('MeetingSignInRecord.ParticipantID', $event)"
:value="getValue('MeetingSignInRecord.ParticipantID')"
:readonly="!edit"
disabled="disabled"
type="user"
title="参与人id"
/>
/> -->
<l-input
@input="setValue('MeetingSignInRecord.ParticipantName', $event)"
:value="getValue('MeetingSignInRecord.ParticipantName')"
:disabled="!edit"
disabled="disabled"
title="参与人名字"
/>
<l-select
@@ -46,9 +46,9 @@
<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 v-if="!edit && mode !== 'create'" @click="action('delete')" size="lg" line="red" class="block margin-top" block>
删除
</l-button>
</l-button> -->
</view>
</view>
</template>
@@ -130,7 +130,12 @@ export default {

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

this.HTTP_GET("learun/adms/PersonnelManagement/MeetingManagement/list",{},"获取会议出错").then(success=>{
if(success){
this.dataSource.MeetingSignInRecord.MeetID=success.map(t=>({text:t.MeetingTitle,value:t.Id}));
}
}),

() => {}
])


Loading…
Cancel
Save