Ver a proveniência

Merge branch '长阳分支中职' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 长阳分支中职

新疆警官学校中职
zhangli há 2 anos
ascendente
cometimento
0b478c423e
14 ficheiros alterados com 3064 adições e 471 eliminações
  1. +37
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json
  2. +1
    -1
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/JournalSend/list.vue
  3. +516
    -450
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave/IndexInStudent/list.vue
  4. +13
    -5
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave/list.vue
  5. +7
    -7
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave/single.vue
  6. +471
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuLeaveManagement/Check/list.vue
  7. +329
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuLeaveManagement/Check/single.vue
  8. +455
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuLeaveManagement/list.vue
  9. +322
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuLeaveManagement/single.vue
  10. +439
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/CustmerLeave/LeaderLeave/list.vue
  11. +443
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/CustmerLeave/TeacherLeave/list.vue
  12. +9
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/list.vue
  13. +10
    -3
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentCheck/list.vue
  14. +12
    -3
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/timeTable/list.vue

+ 37
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json Ver ficheiro

@@ -591,6 +591,43 @@
"navigationBarTitleText": "课表请假管理"
}
},
// 按天请假管理
{
"path": "pages/EducationalAdministration/StuLeaveManagement/list",
"style": {
"navigationBarTitleText": "按天请假管理"
}
},
{
"path": "pages/EducationalAdministration/StuLeaveManagement/single",
"style": {
"navigationBarTitleText": "详情"
}
},
{
"path": "pages/EducationalAdministration/StuLeaveManagement/Check/list",
"style": {
"navigationBarTitleText": "学生按天请假审核"
}
},
{
"path": "pages/PersonnelManagement/CustmerLeave/TeacherLeave/list",
"style": {
"navigationBarTitleText": "普通教师请假统计"
}
},
{
"path": "pages/PersonnelManagement/CustmerLeave/LeaderLeave/list",
"style": {
"navigationBarTitleText": "中层领导请假统计"
}
},
{
"path": "pages/EducationalAdministration/StuLeaveManagement/Check/single",
"style": {
"navigationBarTitleText": "审核"
}
},
//疫情详细信息
{
"path": "pages/PersonnelManagement/ContactsDetails/list",


+ 1
- 1
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/JournalSend/list.vue Ver ficheiro

@@ -3,7 +3,7 @@
<!-- 主列表页 -->
<view :class="sideOpen ? 'show' : ''" class="mainpage" style="padding-top: 80rpx;">
<!-- 顶部条目/分页信息栏 -->
<l-customlist-banner @buttonClick="sideOpen = true">{{ tips }}</l-customlist-banner>
<l-customlist-banner :buttonShow="false" @buttonClick="sideOpen = true">{{ tips }}</l-customlist-banner>
<!-- 滚动列表,跨端支持上拉/下拉 -->
<l-scroll-list v-if="ready" @pullDown="pullDown" @toBottom="fetchList()" ref="list">


+ 516
- 450
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave/IndexInStudent/list.vue Ver ficheiro

@@ -1,453 +1,519 @@
<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, 'UpdateDate') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">审核状态:</text>
{{ LeaveCheckItem(displayListItem(item, 'IsCheck')) }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">审核备注:</text>
{{ displayListItem(item, 'TecRemark') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">请假类型:</text>
{{ LeaveTypeItem(displayListItem(item, 'LeaveType')) }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">学年:</text>
{{ displayListItem(item, 'AcademicYearNo') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">学期:</text>
{{ displayListItem(item, 'Semester') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">学号:</text>
{{ displayListItem(item, 'StuNo') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">姓名:</text>
{{ displayListItem(item, 'StuName') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">年级:</text>
{{ displayListItem(item, 'Grade') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">系所码:</text>
{{ displayListItem(item, 'DeptNo') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">系名:</text>
{{ displayListItem(item, 'DeptName') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">专业码:</text>
{{ displayListItem(item, 'MajorNo') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">专业名:</text>
{{ displayListItem(item, 'MajorName') }}
</view>
<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, 'ClassName') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">课程号:</text>
{{ displayListItem(item, 'LessonNo') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">课程名称:</text>
{{ displayListItem(item, 'LessonName') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">课程类别码:</text>
{{ displayListItem(item, 'LessonSortNo') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">课程类别:</text>
{{ displayListItem(item, 'LessonSortName') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">原上课日期:</text>
{{ displayListItem(item, 'LessonDate') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">上课时间:</text>
{{ displayListItem(item, 'LessonTime') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">教师号:</text>
{{ displayListItem(item, 'EmpNo') }}
</view>
<view class="customlist-item-field">
<text class="customlist-item-field-title">备注:</text>
{{ displayListItem(item, 'Remark') }}
<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, 'UpdateDate') }}
</view>

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

<view class="customlist-item-field">
<text class="customlist-item-field-title">审核备注:</text>
{{ displayListItem(item, 'TecRemark') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">请假类型:</text>
{{ displayListItem(item, 'LeaveType') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">学年:</text>
{{ displayListItem(item, 'AcademicYearNo') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">学期:</text>
{{ displayListItem(item, 'Semester') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">学号:</text>
{{ displayListItem(item, 'StuNo') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">姓名:</text>
{{ displayListItem(item, 'StuName') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">年级:</text>
{{ displayListItem(item, 'Grade') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">系所码:</text>
{{ displayListItem(item, 'DeptNo') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">系名:</text>
{{ displayListItem(item, 'DeptName') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">专业码:</text>
{{ displayListItem(item, 'MajorNo') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">专业名:</text>
{{ displayListItem(item, 'MajorName') }}
</view>

<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, 'ClassName') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">课程号:</text>
{{ displayListItem(item, 'LessonNo') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">课程名称:</text>
{{ displayListItem(item, 'LessonName') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">课程类别码:</text>
{{ displayListItem(item, 'LessonSortNo') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">课程类别:</text>
{{ displayListItem(item, 'LessonSortName') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">原上课日期:</text>
{{ displayListItem(item, 'LessonDate') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">上课时间:</text>
{{ displayListItem(item, 'LessonTime') }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">教师号:</text>
{{ displayListItem(item, 'EmpNo') }}
</view>

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


<!-- <l-customlist-action showDelete @delete="action('delete', item.ID)" />
-->
<view class="customlist-banner-action">
<view @click="delaction(item)" class="customlist-banner-action-btn line-red text-sm"
style="border: currentColor 1px solid">
<l-icon type="delete" />
删除
</view>
</view>

</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.LessonName" @change="searchChange" title="课程名称" placeholder="按课程名称查询" />
<l-input v-model="queryData.Grade" @change="searchChange" title="年级" placeholder="按年级查询" />
<l-input v-model="queryData.StuName" @change="searchChange" title="姓名" placeholder="按姓名查询" />
<l-input v-model="queryData.EmpNo" @change="searchChange" title="教师号" placeholder="按教师号查询" />

<!-- 重置查询条件按钮 -->
<view class="padding-tb">
<l-button @click="reset" line="orange" class="block" block>重置查询条件</l-button>
</view>
</view>
<!-- <l-customlist-action @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.LessonName"
@change="searchChange"
title ="课程名称"
placeholder="按课程名称查询"
/>
<l-input
v-model="queryData.Grade"
@change="searchChange"
title ="年级"
placeholder="按年级查询"
/>
<l-input
v-model="queryData.StuName"
@change="searchChange"
title ="姓名"
placeholder="按姓名查询"
/>
<l-input
v-model="queryData.EmpNo"
@change="searchChange"
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-20 15:22
* 描 述:aaa
*/
/**
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录:
* { "path": "pages/EducationalAdministration/StuAttendanceLeave/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: {
UpdateDate: { type: 'text' },
IsCheck: { type: 'text' },
TecRemark: { type: 'text' },
LeaveType: { type: 'text' },
AcademicYearNo: { type: 'text' },
Semester: { type: 'text' },
StuNo: { type: 'text' },
StuName: { type: 'text' },
Grade: { type: 'text' },
DeptNo: { type: 'text' },
DeptName: { type: 'text' },
MajorNo: { type: 'text' },
MajorName: { type: 'text' },
ClassNo: { type: 'text' },
ClassName: { type: 'text' },
LessonNo: { type: 'text' },
LessonName: { type: 'text' },
LessonSortNo: { type: 'text' },
LessonSortName: { type: 'text' },
LessonDate: { type: 'text' },
LessonTime: { type: 'text' },
EmpNo: { type: 'text' },
Remark: { type: 'text' },
},
// 查询条件
searchData: {},
defaultQueryData: {},
queryData: {
StuNo: '',
StuName: '',
},
// 数据源
dataSource: {
},
// 页面相关参数
ready: false,
tips: '加载中...',
loadState: '向下翻以加载更多',
sideOpen: false,
// 列表与分页信息
page: 1,
total: 2,
list: [],
user: null,
}
},
async onLoad() {
await this.init()
},
onUnload() {
this.OFF('EducationalAdministrationStuAttendanceLeave-list-change')
},
methods: {
// 页面初始化
async init() {
this.ON('EducationalAdministrationStuAttendanceLeave-list-change', this.refreshList)
// 拉取加载列表和数据源
await Promise.all([
() => {}
])
// console.log(this.user)
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/StuAttendanceLeave/pagelist',
{
// 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序)
// 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序
pagination: { rows: 10, page: this.page, sidx: 'Id', sord: 'DESC' },
queryJson: JSON.stringify(Object.assign(this.searchData,{StuNo:this.user.account}) ),
},
'加载数据时出错'
)
if (!result) { return }
this.total = result.total
this.page = result.page + 1
this.list = this.list.concat(result.rows)
// console.log(this.list)
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('learun/adms/EducationalAdministration/StuAttendanceLeave/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
}
},
// 请假审核
LeaveCheckItem(data){
return data==1 ? '同意' : '不同意'
},
// 请假类型审核
LeaveTypeItem(data){
switch(data){
case'1':
return '事假';
break;
case'2':
return '病假';
break;
case'3':
return '婚假';
break;
case'4':
return '探亲假';
break;
case'5':
return '产假';
break;
case'6':
return '丧假';
break;
case'7':
return '补休';
break;
case'8':
return '公假';
break;
case'9':
return '其它';
break;
</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-20 15:22
* 描 述:aaa
*/

/**
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录:
* { "path": "pages/EducationalAdministration/StuAttendanceLeave/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: {
UpdateDate: {
type: 'text'
},
IsCheck: {
type: 'text'
},
TecRemark: {
type: 'text'
},
LeaveType: {
type: "select",dataSource: '1', dataSourceId: 'LeaveType'
},
AcademicYearNo: {
type: 'text'
},
Semester: {
type: 'text'
},
StuNo: {
type: 'text'
},
StuName: {
type: 'text'
},
Grade: {
type: 'text'
},
DeptNo: {
type: 'text'
},
DeptName: {
type: 'text'
},
MajorNo: {
type: 'text'
},
MajorName: {
type: 'text'
},
ClassNo: {
type: 'text'
},
ClassName: {
type: 'text'
},
LessonNo: {
type: 'text'
},
LessonName: {
type: 'text'
},
LessonSortNo: {
type: 'text'
},
LessonSortName: {
type: 'text'
},
LessonDate: {
type: 'text'
},
LessonTime: {
type: 'text'
},
EmpNo: {
type: 'text'
},
Remark: {
type: 'text'
},
},

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

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

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

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

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

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

// 拉取加载列表和数据源
await Promise.all([
() => {}
])
// console.log(this.user)
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/StuAttendanceLeave/pagelist', {
// 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序)
// 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序
pagination: {
rows: 10,
page: this.page,
sidx: 'Id',
sord: 'DESC'
},
queryJson: JSON.stringify(Object.assign(this.searchData, {
StuNo: this.user.account
})),
},
'加载数据时出错'
)

if (!result) {
return
}

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

// console.log(this.list)

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('learun/adms/EducationalAdministration/StuAttendanceLeave/delete', id, '删除失败')
.then(success => {
if (!success) {
return
}
this.TOAST('删除成功', 'success')
this.refreshList()
})
return

default:
return
}
},
// 删除
delaction(item) {
// console.log(item)
if (item.IsCheck == 1 || item.IsCheck == 2) {
this.TOAST('当前项已审核,无法删除', 'error')
} else {
this.HTTP_POST('learun/adms/EducationalAdministration/StuAttendanceLeave/delete', item.ID, '删除失败')
.then(success => {
if (!success) {
return
}
this.TOAST('删除成功', 'success')
this.refreshList()
})
}
},

// 显示列表中的标题项
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
}
},
// 请假审核
LeaveCheckItem(data) {
switch (data) {
case '1':
return '同意';
break;
case '2':
return '不同意';
break;
default:
return '申请中'
}
}

},
created() {
this.user = this.GET_GLOBAL('loginUser');
}
}
</script>


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

.customlist-banner-action {
margin-top: 20rpx;
text-align: right;

.customlist-banner-action-btn {
display: inline-block;
padding: 4px 6px;
margin: 0 3px;
border-radius: 3px;
text-align: center;
}
}
},
created() {
this.user = this.GET_GLOBAL('loginUser');
}
}
</script>
<style lang="less" scoped>
@import '~@/common/css/sidepage.less';
@import '~@/common/css/customlist.less';
</style>
</style>

+ 13
- 5
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave/list.vue Ver ficheiro

@@ -62,7 +62,7 @@
</view>
<l-customlist-action showButton buttonText="审核" @join="action('check',item.Id)" @view="action('view', item.Id)" />
<l-customlist-action showButton buttonText="审核" @join="action('check',item.ID)" @view="action('view', item.ID)" />
</view>
</l-customlist>
</l-scroll-list>
@@ -164,7 +164,8 @@ export default {
// 列表与分页信息
page: 1,
total: 2,
list: []
list: [],
user: null
}
},
@@ -202,7 +203,7 @@ export default {
// 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序)
// 代码生成器生成时默认按照主键排序,您可以修改成按创建时间的字段降序
pagination: { rows: 10, page: this.page, sidx: 'Id', sord: 'DESC' },
queryJson: JSON.stringify(this.searchData)
queryJson: JSON.stringify(Object.assign(this.searchData,{ClassManagerNo:this.user.account}))
},
'加载数据时出错'
)
@@ -277,7 +278,11 @@ export default {
this.refreshList()
})
return
case 'check':
this.NAV_TO(`./single?type=edit&id=${id}`)
return
default:
return
}
@@ -311,7 +316,10 @@ export default {
}
}
}
},
created() {
this.user = this.GET_GLOBAL('loginUser');
}
}
</script>


+ 7
- 7
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuAttendanceLeave/single.vue Ver ficheiro

@@ -142,20 +142,20 @@
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>
<!-- v-if="ready" -->
<view v-if="edit" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;">
<l-button @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 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> -->
<!-- <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>


+ 471
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuLeaveManagement/Check/list.vue Ver ficheiro

@@ -0,0 +1,471 @@
<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>
{{ CheckStatusitem(displayListItem(item, "CheckStatus")) }}
<!-- {{ CheckStatusitem(item, "CheckStatus") }} -->
</view>

<!-- <view class="customlist-item-field">
<text class="customlist-item-field-title">审核备注:</text>
{{ displayListItem(item, "CheckRemark") }}
</view> -->


<view class="customlist-item-field">
<text class="customlist-item-field-title">审核时间:</text>
{{ displayListItem(item, "CheckTime") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">审核人:</text>
{{ displayListItem(item, "CheckUserNo") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">请假类型:</text>
{{ displayListItem(item, "LeaveType") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">开始时间:</text>
{{ displayListItem(item, "StartTime") }}
</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, "LeaveDay") }}
</view>

<!-- <view class="customlist-item-field">
<text class="customlist-item-field-title">请假事由:</text>
{{ displayListItem(item, "LeaveReason") }}
</view> -->

<view class="customlist-item-field">
<text class="customlist-item-field-title">学号:</text>
{{ displayListItem(item, "CreateUserNo") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">姓名:</text>
{{ displayListItem(item, "CreateUserName") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">申请时间:</text>
{{ displayListItem(item, "CreateTime") }}
</view>

<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, "DeptNo") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">专业:</text>
{{ displayListItem(item, "MajorNo") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">班主任:</text>
{{ displayListItem(item, "ClassDiredctorNo") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">辅导员:</text>
{{ displayListItem(item, "ClassTutorNo") }}
</view>

<l-customlist-action :showButton="!item.CheckStatus" buttonText="审核"
@join="action('check', 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-select v-model="queryData.LeaveType" @change="searchChange" :range="dataSource.LeaveType"
title="请假类型" placeholder="按请假类型查询" />
<l-select v-model="queryData.CheckStatus" @change="searchChange" :range="dataSource.CheckStatus"
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: {
CheckStatus: {
type: "text",
// type: "select",dataSource: '1', dataSourceId: 'CheckStatus'
},
CheckRemark: {
type: "text"
},
CheckTime: {
type: "text"
},
CheckUserNo: {
type: "text"
},
LeaveType: {
type: "select",dataSource: '1', dataSourceId: 'LeaveType'
},
StartTime: {
type: "text"
},
EndTime: {
type: "text"
},
LeaveDay: {
type: "text"
},
LeaveReason: {
type: "text"
},
CreateUserNo: {
type: "text"
},
CreateUserName: {
type: "text"
},
CreateTime: {
type: "text"
},
ClassNo: {
type: "text"
},
DeptNo: {
type: "text"
},
MajorNo: {
type: "text"
},
ClassDiredctorNo: {
type: "text"
},
ClassTutorNo: {
type: "text"
}
},

// 查询条件
searchData: {},
defaultQueryData: {},
queryData: {
LeaveType: "",
CheckStatus: '',
// CreateUser: "",
},

// 数据源
dataSource: {
LeaveType: Object.values(this.GET_GLOBAL('dataDictionary').LeaveType).map(t => ({
value: t.value,
text: t.text
})),
CheckStatus: Object.values(this.GET_GLOBAL('dataDictionary').LeaveCheck).map(t => ({
value: t.value,
text: t.text
})),
},

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

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

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

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

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

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

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

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

if (!result) {
return;
}

this.total = result.total;
this.page = result.page + 1;
this.list = isConcat ? this.list.concat(result.rows) : result.rows;

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

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

await this.fetchList(isConcat);
},

// 列表下拉
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(false);
},

// 点击「清空查询条件」按钮
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 "join":
// console.log(123);
this.NAV_TO(`/pages/EducationalAdministration/StuLeaveManagement/Check/list?meetId=${id}`);
return;

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

this.HTTP_POST(
"/Learun/adms/EducationalAdministration/StuLeaveManagement/delete",
id,
"删除失败"
).then((success) => {
if (!success) {
return;
}
this.TOAST("删除成功", "success");
this.refreshList();
});
return;

case 'check':
await this.HTTP_GET('/Learun/adms/EducationalAdministration/StuLeaveManagement/ischeck', id).then(res=>{
if(res){
this.NAV_TO(`./single?type=edit&id=${id}`)
return
}else{
return;
}
})
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;
}
},
// 审核状态
CheckStatusitem(data) {
if (data) {
return data == '1' ? '通过' : '不通过'
} else {
return '申请中'
}
},
// 请假类型审核
LeaveTypeItem(data) {

},
},
created() {
this.user = this.GET_GLOBAL('loginUser');
}
};
</script>


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

+ 329
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuLeaveManagement/Check/single.vue Ver ficheiro

@@ -0,0 +1,329 @@
<template>
<view class="page">
<view v-if="ready">
<l-select
@input="setValue('StuLeaveManagement.CheckStatus', $event)"
:value="getValue('StuLeaveManagement.CheckStatus')"
:range="dataSource.StuLeaveManagement.CheckStatus"
title="审核状态"
:disabled="!edit"
required
/>
<l-textarea
@input="setValue('StuLeaveManagement.CheckRemark', $event)"
:value="getValue('StuLeaveManagement.CheckRemark')"
title="审核备注"
:readonly="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.CheckTime', $event)"
:value="getValue('StuLeaveManagement.CheckTime')"
title="审核时间"
v-if="!edit"
:disabled="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.CheckUserNo', $event)"
:value="getValue('StuLeaveManagement.CheckUserNo')"
title="审核人"
v-if="!edit"
:disabled="!edit"
/>
<l-select
@input="setValue('StuLeaveManagement.LeaveType', $event)"
:value="getValue('StuLeaveManagement.LeaveType')"
:range="dataSource.StuLeaveManagement.LeaveType"
title="请假类型"
required
disabled
/>
<l-datetime-picker
@input="setValue('StuLeaveManagement.StartTime', $event)"
:value="getValue('StuLeaveManagement.StartTime')"
title="开始时间"
required
disabled
/>
<l-datetime-picker
@input="setValue('StuLeaveManagement.EndTime', $event)"
:value="getValue('StuLeaveManagement.EndTime')"
title="结束时间"
required
disabled
/>
<l-input
@input="setValue('StuLeaveManagement.LeaveDay', $event)"
:value="getValue( String('StuLeaveManagement.LeaveDay'))"
type="number"
title="请假天数"
disabled
/>
<l-textarea
@input="setValue('StuLeaveManagement.LeaveReason', $event)"
:value="getValue('StuLeaveManagement.LeaveReason')"
title="请假事由"
readonly
/>
<l-input
@input="setValue('StuLeaveManagement.CreateUserNo', $event)"
:value="getValue('StuLeaveManagement.CreateUserNo')"
:readonly="!edit"
title="学号"
disabled
v-if="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.CreateUserName', $event)"
:value="getValue('StuLeaveManagement.CreateUserName')"
title="姓名"
disabled
v-if="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.CreateTime', $event)"
:value="getValue('StuLeaveManagement.CreateTime')"
title="申请时间"
disabled
v-if="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.ClassNo', $event)"
:value="getValue('StuLeaveManagement.ClassNo')"
title="班级"
disabled
v-if="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.DeptNo', $event)"
:value="getValue('StuLeaveManagement.DeptNo')"
title="系部"
disabled
v-if="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.MajorNo', $event)"
:value="getValue('StuLeaveManagement.MajorNo')"
title="专业"
disabled
v-if="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.ClassDiredctorNo', $event)"
:value="getValue('StuLeaveManagement.ClassDiredctorNo')"
title="班主任"
disabled
v-if="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.ClassTutorNo', $event)"
:value="getValue('StuLeaveManagement.ClassTutorNo')"
title="辅导员"
disabled
v-if="!edit"
/>
</view>

<view v-if="ready&&(origin.StuLeaveManagement.CheckStatus=='0'||edit)" 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/StuLeaveManagement/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: {
StuLeaveManagement: {
CheckStatus: { type: 'select', title: '审核状态', dataSource: '0',verify:"NotNull" },
CheckRemark: { type: 'texteditor', title: '审核备注', },
CheckTime:{ type: 'text', title: '审核人' },
CheckUserNo: { type: 'text', title: '审核人' },
LeaveType: { type: 'select', title: '请假类型', dataSource: '0' },
StartTime: { type: 'datetime', title: '开始时间', dateformat: '1' },
EndTime: { type: 'datetime', title: '结束时间', dateformat: '1' },
LeaveDay: { type: 'number', title: '请假天数',verify:"NumOrNull" },
LeaveReason: { type: 'texteditor', title: '请假事由' },
CreateUserNo: { type: 'text', title: '学号' },
CreateUserName: { type: 'text', title: '姓名' },
CreateTime: { type: 'text', title: '申请时间' },
ClassNo: { type: 'text', title: '班级' },
DeptNo: { type: 'text', title: '系部' },
MajorNo: { type: 'text', title: '专业' },
ClassDiredctorNo: { type: 'text', title: '班主任' },
ClassTutorNo: { type: 'text', title: '辅导员' },
},

},

// 数据源
dataSource: {
StuLeaveManagement:{
LeaveType: Object.values(this.GET_GLOBAL('dataDictionary').LeaveType).map(t => ({ value: t.value, text: t.text })),
CheckStatus: Object.values(this.GET_GLOBAL('dataDictionary').LeaveCheck).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([
// this.FETCH_DATASOURCE('ConferenceRoom').then(result => {
// this.dataSource.StuLeaveManagement.CheckStatus = result.data.map(t => ({ text: t.name, value: t.id }))
// }),
])
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('/Learun/adms/EducationalAdministration/StuLeaveManagement/form', this.id)
this.origin = await this.formatFormData(result)
// console.log(this.origin,this.origin.prototype)
}
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':
// console.log(this.current)
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('/Learun/adms/EducationalAdministration/StuLeaveManagement/savecheck', postData, '表单提交保存失败').then(success => {
this.HIDE_LOADING()
if (!success) {
return
}

this.EMIT('EducationalAdministrationStuLeaveManagementCheck-list-change')
// this.NAV_BACK()
uni.navigateBack({})
this.TOAST('提交保存成功')
})
break

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

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

this.EMIT('EducationalAdministrationStuLeaveManagementCheck-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>



+ 455
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuLeaveManagement/list.vue Ver ficheiro

@@ -0,0 +1,455 @@
<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>
{{ CheckStatusitem(displayListItem(item, "CheckStatus")) }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">审核备注:</text>
{{ displayListItem(item, "CheckRemark") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">审核人:</text>
{{ displayListItem(item, "CheckUserNo") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">请假类型:</text>
{{ displayListItem(item, "LeaveType") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">开始时间:</text>
{{ displayListItem(item, "StartTime") }}
</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, "LeaveDay") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">请假事由:</text>
{{ displayListItem(item, "LeaveReason") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">学号:</text>
{{ displayListItem(item, "CreateUserNo") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">姓名:</text>
{{ displayListItem(item, "CreateUserName") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">申请时间:</text>
{{ displayListItem(item, "CreateTime") }}
</view>

<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, "DeptNo") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">专业:</text>
{{ displayListItem(item, "MajorNo") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">班主任:</text>
{{ displayListItem(item, "ClassDiredctorNo") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">辅导员:</text>
{{ displayListItem(item, "ClassTutorNo") }}
</view>

<l-customlist-action @join="action('join', item.Id)" :showEdit="!item.CheckStatus"
@edit="action('edit', item.Id)" :showDelete="!item.CheckStatus"
@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-select v-model="queryData.LeaveType" @change="searchChange" :range="dataSource.LeaveType"
title="请假类型" placeholder="按请假类型查询" />
<l-select v-model="queryData.CheckStatus" @change="searchChange" :range="dataSource.CheckStatus"
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: {
CheckStatus: {
type: "text"
},
CheckRemark: {
type: "text"
},
CheckTime: {
type: "text"
},
CheckUserNo: {
type: "text"
},
LeaveType: {
type: "select",dataSource: '1', dataSourceId: 'LeaveType'
},
StartTime: {
type: "text"
},
EndTime: {
type: "text"
},
LeaveDay: {
type: "text"
},
LeaveReason: {
type: "text"
},
CreateUserNo: {
type: "text"
},
CreateUserName: {
type: "text"
},
CreateTime: {
type: "text"
},
ClassNo: {
type: "text"
},
DeptNo: {
type: "text"
},
MajorNo: {
type: "text"
},
ClassDiredctorNo: {
type: "text"
},
ClassTutorNo: {
type: "text"
}
},

// 查询条件
searchData: {},
defaultQueryData: {},
queryData: {
LeaveType: "",
CheckStatus: '',
// CreateUser: "",
},

// 数据源
dataSource: {
LeaveType: Object.values(this.GET_GLOBAL('dataDictionary').LeaveType).map(t => ({
value: t.value,
text: t.text
})),
CheckStatus: Object.values(this.GET_GLOBAL('dataDictionary').LeaveCheck).map(t => ({
value: t.value,
text: t.text
})),
},

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

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

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

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

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

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

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

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

if (!result) {
return;
}

this.total = result.total;
this.page = result.page + 1;
this.list = isConcat ? this.list.concat(result.rows) : result.rows;

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

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

await this.fetchList(isConcat);
},

// 列表下拉
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(false);
},

// 点击「清空查询条件」按钮
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 "join":
// console.log(123);
this.NAV_TO(`/pages/EducationalAdministration/StuLeaveManagement/list?meetId=${id}`);
return;

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

this.HTTP_POST(
"/Learun/adms/EducationalAdministration/StuLeaveManagement/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;
}
},
// 审核状态
CheckStatusitem(data) {
if (data) {
return data == '1' ? '通过' : '不通过'
} else {
return '申请中'
}
},
// 请假类型审核
LeaveTypeItem(data) {

},
},
created() {
this.user = this.GET_GLOBAL('loginUser');
}
};
</script>


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

+ 322
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuLeaveManagement/single.vue Ver ficheiro

@@ -0,0 +1,322 @@
<template>
<view class="page">
<view v-if="ready">
<l-select
@input="setValue('StuLeaveManagement.CheckStatus', $event)"
:value="getValue('StuLeaveManagement.CheckStatus')"
:range="dataSource.StuLeaveManagement.CheckStatus"
title="审核状态"
:disabled="!edit"
v-if="!edit"
/>
<l-textarea
@input="setValue('StuLeaveManagement.CheckRemark', $event)"
:value="getValue('StuLeaveManagement.CheckRemark')"
title="审核备注"
v-if="!edit"
:readonly="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.CheckUserNo', $event)"
:value="getValue('StuLeaveManagement.CheckUserNo')"
title="审核人"
v-if="!edit"
:disabled="!edit"
/>
<l-select
@input="setValue('StuLeaveManagement.LeaveType', $event)"
:value="getValue('StuLeaveManagement.LeaveType')"
:range="dataSource.StuLeaveManagement.LeaveType"
title="请假类型"
required
:disabled="!edit"
/>
<l-datetime-picker
@input="setValue('StuLeaveManagement.StartTime', $event)"
:value="getValue('StuLeaveManagement.StartTime')"
title="开始时间"
required
:disabled="!edit"
/>
<l-datetime-picker
@input="setValue('StuLeaveManagement.EndTime', $event)"
:value="getValue('StuLeaveManagement.EndTime')"
title="结束时间"
required
:disabled="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.LeaveDay', $event)"
:value="getValue( String('StuLeaveManagement.LeaveDay'))"
type="number"
title="请假天数"
:disabled="!edit"
/>
<l-textarea
@input="setValue('StuLeaveManagement.LeaveReason', $event)"
:value="getValue('StuLeaveManagement.LeaveReason')"
title="请假事由"
:readonly="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.CreateUserNo', $event)"
:value="getValue('StuLeaveManagement.CreateUserNo')"
:readonly="!edit"
title="学号"
disabled
v-if="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.CreateUserName', $event)"
:value="getValue('StuLeaveManagement.CreateUserName')"
title="姓名"
disabled
v-if="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.CreateTime', $event)"
:value="getValue('StuLeaveManagement.CreateTime')"
title="申请时间"
disabled
v-if="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.ClassNo', $event)"
:value="getValue('StuLeaveManagement.ClassNo')"
title="班级"
disabled
v-if="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.DeptNo', $event)"
:value="getValue('StuLeaveManagement.DeptNo')"
title="系部"
disabled
v-if="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.MajorNo', $event)"
:value="getValue('StuLeaveManagement.MajorNo')"
title="专业"
disabled
v-if="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.ClassDiredctorNo', $event)"
:value="getValue('StuLeaveManagement.ClassDiredctorNo')"
title="班主任"
disabled
v-if="!edit"
/>
<l-input
@input="setValue('StuLeaveManagement.ClassTutorNo', $event)"
:value="getValue('StuLeaveManagement.ClassTutorNo')"
title="辅导员"
disabled
v-if="!edit"
/>
</view>

<view v-if="ready&&(origin.StuLeaveManagement.CheckStatus=='0'||edit)" 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/StuLeaveManagement/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: {
StuLeaveManagement: {
CheckStatus: { type: 'select', title: '审核状态', dataSource: '0' },
CheckRemark: { type: 'texteditor', title: '审核备注', },
CheckUserNo: { type: 'text', title: '审核人' },
LeaveType: { type: 'select', title: '请假类型', dataSource: '0',verify:"NotNull" },
StartTime: { type: 'datetime', title: '开始时间', dateformat: '1',verify:"NotNull" },
EndTime: { type: 'datetime', title: '结束时间', dateformat: '1',verify:"NotNull" },
LeaveDay: { type: 'number', title: '请假天数',verify:"NumOrNull" },
LeaveReason: { type: 'texteditor', title: '请假事由' },
CheckUserNo: { type: 'text', title: '学号' },
CreateUserName: { type: 'text', title: '姓名' },
CreateTime: { type: 'text', title: '申请时间' },
ClassNo: { type: 'text', title: '班级' },
DeptNo: { type: 'text', title: '系部' },
MajorNo: { type: 'text', title: '专业' },
ClassDiredctorNo: { type: 'text', title: '班主任' },
ClassTutorNo: { type: 'text', title: '辅导员' },
},

},

// 数据源
dataSource: {
StuLeaveManagement:{
LeaveType: Object.values(this.GET_GLOBAL('dataDictionary').LeaveType).map(t => ({ value: t.value, text: t.text })),
CheckStatus: Object.values(this.GET_GLOBAL('dataDictionary').LeaveCheck).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([
// this.FETCH_DATASOURCE('ConferenceRoom').then(result => {
// this.dataSource.StuLeaveManagement.CheckStatus = result.data.map(t => ({ text: t.name, value: t.id }))
// }),
])
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('/Learun/adms/EducationalAdministration/StuLeaveManagement/form', this.id)
this.origin = await this.formatFormData(result)
// console.log(this.origin,this.origin.prototype)
}
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':
// console.log(this.current)
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('/Learun/adms/EducationalAdministration/StuLeaveManagement/save', postData, '表单提交保存失败').then(success => {
this.HIDE_LOADING()
if (!success) {
return
}

this.EMIT('EducationalAdministrationStuLeaveManagement-list-change')
// this.NAV_BACK()
uni.navigateBack({})
this.TOAST('提交保存成功')
})
break

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

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

this.EMIT('EducationalAdministrationStuLeaveManagement-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>



+ 439
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/CustmerLeave/LeaderLeave/list.vue Ver ficheiro

@@ -0,0 +1,439 @@
<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 data-v-08b3cd5e 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, "StartDate") }}
</view>

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

<!-- <view class="customlist-item-field">
<text class="customlist-item-field-title">姓名:</text>
{{ displayListItem(item, "F_CreateUserName") }}
</view> -->

<!-- <view class="customlist-item-field">
<text class="customlist-item-field-title">所属部门:</text>
{{ displayListItem(item, "F_BuMen") }}
</view> -->


<view class="customlist-item-field">
<text class="customlist-item-field-title">上下午:</text>
{{ displayListItem(item, "F_shangxiawu") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">上下午:</text>
{{ displayListItem(item, "F_sxw") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">请假天数:</text>
{{ displayListItem(item, "F_tianshu") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">请假类型:</text>
{{ displayListItem(item, "F_QJType") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">请假事由:</text>
{{ displayListItem(item, "F_Description") }}
</view>


<!-- <l-customlist-action @join="action('join', item.Id)" :showEdit="!item.CheckStatus"
@edit="action('edit', item.Id)" :showDelete="!item.CheckStatus"
@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-customlist-sidepage-datefilter v-model="dateRange" @change="searchChange" title="按时间日期查询: "
ref="datefilter" class="margin-bottom" />
<!-- <l-select v-model="queryData.F_CreateUserName" @change="searchChange"
:range="dataSource.F_CreateUserName" title="姓名" placeholder="按姓名查询" /> -->
<!-- <l-select v-model="queryData.F_BuMen" @change="searchChange" :range="dataSource.F_BuMen" title="所属部门"
placeholder="按所属部门查询" /> -->
<l-select v-model="queryData.F_QJType" @change="searchChange" :range="dataSource.F_QJType" 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: {
StartDate: {
type: "text"
},
EndDate: {
type: "text"
},
// F_CreateUserName: {
// type: "select",
// dataSource: '1',
// dataSourceId: 'F_CreateUserName'
// },
// F_BuMen: {
// type: "select",
// dataSource: '1',
// dataSourceId: 'F_BuMen'
// },
F_shangxiawu: {
type: "select",
dataSource: '1',
dataSourceId: 'F_shangxiawu'
},
F_sxw: {
type: "select",
dataSource: '1',
dataSourceId: 'F_sxw'
},
F_tianshu: {
type: "text"
},
F_QJType: {
type: "select",
dataSource: '1',
dataSourceId: 'F_QJType'
},
F_Description: {
type: "text"
}
},

// 查询条件
searchData: {},
defaultQueryData: {},
queryData: {
// F_CreateUserName: "",
// F_BuMen: "",
F_QJType: ""
},
// 数据源
dataSource: {
F_QJType: Object.values(this.GET_GLOBAL('dataDictionary').LeaveType).map(t => ({
value: t.value,
text: t.text
})),
// F_BuMen: [],
// F_CreateUserName: [],
F_shangxiawu: Object.values(this.GET_GLOBAL('dataDictionary').sxw).map(t => ({
value: t.value,
text: t.text
})),
F_sxw: Object.values(this.GET_GLOBAL('dataDictionary').sxw).map(t => ({
value: t.value,
text: t.text
})),
},
// 时间查询参数
dateRange: null,
// 页面相关参数
ready: false,
tips: "加载中...",
loadState: "向下翻以加载更多",
sideOpen: false,

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

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

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

// 拉取加载列表和数据源
await Promise.all([
// this.FETCH_DATASOURCE('classdata').then(result => {
// // console.log(result.data)
// this.dataSource.F_BuMen = result.data.map(t => ({
// text: t.name,
// value: t.id
// }));
// }),

// this.FETCH_DATASOURCE('teacheruserdata').then(result => {
// // console.log(result.data)
// this.dataSource.F_CreateUserName = result.data.map(t => ({
// text: t.f_realname,
// value: t.f_userid
// }));
// }),


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

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

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

if (!result) {
return;
}

this.total = result.total;
this.page = result.page + 1;
this.list = isConcat ? this.list.concat(result.rows) : result.rows;

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

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

await this.fetchList(isConcat);
},

// 列表下拉
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(false);
},

// 点击「清空查询条件」按钮
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 "join":
// console.log(123);
this.NAV_TO(`/pages/EducationalAdministration/StuLeaveManagement/list?meetId=${id}`);
return;

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

this.HTTP_POST(
"/Learun/adms/EducationalAdministration/StuLeaveManagement/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;
}
},
// 审核状态
CheckStatusitem(data) {
if (data) {
return data == '1' ? '通过' : '不通过'
} else {
return '申请中'
}
},
// 请假类型审核
LeaveTypeItem(data) {

},
},
created() {
this.user = this.GET_GLOBAL('loginUser');
}
};
</script>


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

+ 443
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/CustmerLeave/TeacherLeave/list.vue Ver ficheiro

@@ -0,0 +1,443 @@
<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 data-v-08b3cd5e 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, "StartDate") }}
</view>

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

<!-- <view class="customlist-item-field">
<text class="customlist-item-field-title">姓名:</text>
{{ displayListItem(item, "F_CreateUserName") }}
</view> -->

<!-- <view class="customlist-item-field">
<text class="customlist-item-field-title">所属部门:</text>
{{ displayListItem(item, "F_BuMen") }}
</view> -->

<view class="customlist-item-field">
<text class="customlist-item-field-title">上下午:</text>
{{ displayListItem(item, "F_shangxiawu") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">上下午:</text>
{{ displayListItem(item, "F_sxw") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">请假天数:</text>
{{ displayListItem(item, "F_tianshu") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">请假类型:</text>
{{ displayListItem(item, "F_QJType") }}
</view>

<view class="customlist-item-field">
<text class="customlist-item-field-title">请假事由:</text>
{{ displayListItem(item, "F_Description") }}
</view>


<!-- <l-customlist-action @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.F_CreateUserName" @change="searchChange"
:range="dataSource.F_CreateUserName" title="姓名" placeholder="按姓名查询" /> -->
<!-- <l-select v-model="queryData.F_BuMen" @change="searchChange" :range="dataSource.F_BuMen" title="所属部门"
placeholder="按所属部门查询" /> -->
<l-select v-model="queryData.F_QJType" @change="searchChange" :range="dataSource.F_QJType" title="请假类型"
placeholder="按请假类型查询" />
<l-input v-model="queryData.F_Description" @change="searchChange" title="请假事由" />
<!-- 重置查询条件按钮 -->
<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: {
StartDate: {
type: "text"
},
EndDate: {
type: "text"
},
// F_CreateUserName: {
// type: "select",
// dataSource: '1',
// dataSourceId: 'F_CreateUserName'
// },
// F_BuMen: {
// type: "select",
// dataSource: '1',
// dataSourceId: 'F_BuMen'
// },
F_shangxiawu: {
type: "select",
dataSource: '1',
dataSourceId: 'F_shangxiawu'
},
F_sxw: {
type: "select",
dataSource: '1',
dataSourceId: 'F_sxw'
},
F_tianshu: {
type: "text"
},
F_QJType: {
type: "select",
dataSource: '1',
dataSourceId: 'F_QJType'
},
F_Description: {
type: "text"
}
},

// 查询条件
searchData: {},
defaultQueryData: {},
queryData: {
// F_CreateUserName: "",
// F_BuMen: "",
F_QJType: "",
F_Description: "",
// CreateUser: "",
},
// 数据源
dataSource: {
F_QJType: Object.values(this.GET_GLOBAL('dataDictionary').LeaveType).map(t => ({
value: t.value,
text: t.text
})),
// F_BuMen: [],
// F_CreateUserName: [],
F_shangxiawu: Object.values(this.GET_GLOBAL('dataDictionary').sxw).map(t => ({
value: t.value,
text: t.text
})),
F_sxw: Object.values(this.GET_GLOBAL('dataDictionary').sxw).map(t => ({
value: t.value,
text: t.text
})),
},
// 时间查询参数
dateRange: null,
// 页面相关参数
ready: false,
tips: "加载中...",
loadState: "向下翻以加载更多",
sideOpen: false,

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

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

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

// 拉取加载列表和数据源
await Promise.all([
// this.FETCH_DATASOURCE('classdata').then(result => {
// // console.log(result.data)
// this.dataSource.F_BuMen = result.data.map(t => ({
// text: t.name,
// value: t.id
// }));
// }),

// this.FETCH_DATASOURCE('teacheruserdata').then(result => {
// // console.log(result.data)
// this.dataSource.F_CreateUserName = result.data.map(t => ({
// text: t.f_realname,
// value: t.f_userid
// }));
// }),


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

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

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

if (!result) {
return;
}

this.total = result.total;
this.page = result.page + 1;
this.list = isConcat ? this.list.concat(result.rows) : result.rows;

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

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

await this.fetchList(isConcat);
},

// 列表下拉
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(false);
},

// 点击「清空查询条件」按钮
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 "join":
// console.log(123);
this.NAV_TO(`/pages/EducationalAdministration/StuLeaveManagement/list?meetId=${id}`);
return;

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

this.HTTP_POST(
"/Learun/adms/EducationalAdministration/StuLeaveManagement/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;
}
},
// 审核状态
CheckStatusitem(data) {
if (data) {
return data == '1' ? '通过' : '不通过'
} else {
return '申请中'
}
},
// 请假类型审核
LeaveTypeItem(data) {

},
},
created() {
this.user = this.GET_GLOBAL('loginUser');
// console.log(this.user)
}
};
</script>


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

+ 9
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentAttendance/list.vue Ver ficheiro

@@ -196,15 +196,22 @@
this.HIDE_LOADING();
_this.semester = res.semester
_this.dataArr = _this.ProcessingData(res.weekList);
console.log(_this.dataArr)
// console.log(_this.dataArr)
// 回显日期
if (!start) {
_this.todayWeek.MondayTime = new Date(res.startDate).valueOf();
_this.todayWeek.SundayTime = new Date(res.endDate).valueOf() + _this.noClassTime;
_this.todayWeek.SundayTime = new Date(res.endDate).valueOf()
_this.num = 0;
_this.todayWeek.Monday = common.fmtDate(_this.todayWeek.MondayTime);
_this.todayWeek.Sunday = common.fmtDate(_this.todayWeek.SundayTime);
}
// if (!start) {
// _this.todayWeek.MondayTime = new Date(res.startDate).valueOf();
// _this.todayWeek.SundayTime = new Date(res.endDate).valueOf() + _this.noClassTime;
// _this.num = 0;
// _this.todayWeek.Monday = common.fmtDate(_this.todayWeek.MondayTime);
// _this.todayWeek.Sunday = common.fmtDate(_this.todayWeek.SundayTime);
// }
});

},


+ 10
- 3
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/studentCheck/list.vue Ver ficheiro

@@ -191,15 +191,22 @@
// 回显日期
if (!start) {
_this.todayWeek.MondayTime = new Date(res.startDate).valueOf();
_this.todayWeek.SundayTime = new Date(res.endDate).valueOf() + _this.noClassTime;
_this.todayWeek.SundayTime = new Date(res.endDate).valueOf();
_this.num = 0;
_this.todayWeek.Monday = common.fmtDate(_this.todayWeek.MondayTime);
_this.todayWeek.Sunday = common.fmtDate(_this.todayWeek.SundayTime);
}
// if (!start) {
// _this.todayWeek.MondayTime = new Date(res.startDate).valueOf();
// _this.todayWeek.SundayTime = new Date(res.endDate).valueOf() + _this.noClassTime;
// _this.num = 0;
// _this.todayWeek.Monday = common.fmtDate(_this.todayWeek.MondayTime);
// _this.todayWeek.Sunday = common.fmtDate(_this.todayWeek.SundayTime);
// }
console.log(res)
// console.log(res)
_this.dataArr.length = 0;
for(let j = 1; j < 8; j++){
for(let j = 1; j < 11; j++){
let dataFlag = true;
var num = Math.floor(Math.random() * 100000000);
res.results.forEach((n, i) => {


+ 12
- 3
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/timeTable/list.vue Ver ficheiro

@@ -137,6 +137,7 @@
_this.todayWeek.SundayTime = _this.todayWeek.SundayTime + _this.weekDayTime;
}
_this.num = 0;
// console.log(_this.todayWeek.MondayTime)
_this.todayWeek.Monday = common.fmtDate(_this.todayWeek.MondayTime);
_this.todayWeek.Sunday = common.fmtDate(_this.todayWeek.SundayTime);
_this.loadData(_this.todayWeek.Monday, _this.todayWeek.Sunday);
@@ -160,14 +161,22 @@
this.HIDE_LOADING();
_this.semester = res.semester
_this.dataArr = _this.ProcessingData(res.weekList);
// 回显日期
// console.log(res)
if (!start) {
_this.todayWeek.MondayTime = new Date(res.startDate).valueOf();
_this.todayWeek.SundayTime = new Date(res.endDate).valueOf() + _this.noClassTime;
_this.todayWeek.SundayTime = new Date(res.endDate).valueOf();
_this.num = 0;
_this.todayWeek.Monday = common.fmtDate(_this.todayWeek.MondayTime);
_this.todayWeek.Sunday = common.fmtDate(_this.todayWeek.SundayTime);
}
// // 回显日期
// if (!start) {
// _this.todayWeek.MondayTime = new Date(res.startDate).valueOf();
// _this.todayWeek.SundayTime = new Date(res.endDate).valueOf() + _this.noClassTime;
// _this.num = 0;
// _this.todayWeek.Monday = common.fmtDate(_this.todayWeek.MondayTime);
// _this.todayWeek.Sunday = common.fmtDate(_this.todayWeek.SundayTime);
// }
});

},
@@ -187,7 +196,7 @@
},
classTap(data) {
// return ""
console.log(data)
// console.log(data)
let _this = this;
// console.log(_this.user)
if (_this.user.Description == "教师") {


Carregando…
Cancelar
Guardar