Преглед на файлове

【增加】移动端:我的月绩效;

应县
dyy преди 7 месеца
родител
ревизия
a25fdcb3a7
променени са 3 файла, в които са добавени 840 реда и са изтрити 0 реда
  1. +13
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json
  2. +385
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/JobPerformance/list.vue
  3. +442
    -0
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/JobPerformance/single.vue

+ 13
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json Целия файл

@@ -1211,6 +1211,19 @@
"navigationBarTitleText": "详情"
}
},
// 月常规工作绩效
{
"path": "pages/JobPerformance/list",
"style": {
"navigationBarTitleText": "我的月绩效"
}
},
{
"path": "pages/JobPerformance/single",
"style": {
"navigationBarTitleText": "我的月绩效"
}
},
//考试安排教师功能
{
"path": "pages/EducationalAdministration/ArrangeExamTermNew/list",


+ 385
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/JobPerformance/list.vue Целия файл

@@ -0,0 +1,385 @@

<template>
<view class="page">
<!-- 主列表页 -->
<view :class="sideOpen ? 'show' : ''" class="mainpage" >
<view class="timeTable_sec1">
<view class="tSec1Box" id="weekTime">
<text class="text-xxl cuIcon cuIcon-back" @click="timeTap(1)"></text>
<text style="margin: 0;">{{searchData.IssueYear}}</text>
<text>年</text>
<text style="margin: 0;">{{searchData.IssueMonth}}</text>
<text>月</text>
<text class="text-xxl cuIcon cuIcon-right" @click="timeTap(2)"></text>
</view>
<view style="text-align: center;font-size: 60rpx;margin-top: 15rpx;color: #ffffff;">
{{list.length > 0 ? list[0].PerformanceTotalScore || 0 : 0}}
</view>
<view style="text-align: center;font-size: 20rpx;margin-top: 15rpx;color: #94d4ff;">
<text style="margin: 0;">{{searchData.IssueYear}}</text>
<text>年</text>
<text style="margin: 0;">{{searchData.IssueMonth}}</text>
<text>月常规工作绩效</text>
</view>
</view>
<view>
<view class="item-titlewrap" @click="GoTosingle(1)">
<text>月绩效考核分合计</text>
<text>{{list.length > 0 ? list[0].PerformanceTotalScore || 0 : 0}} <text class="text-xxl cuIcon cuIcon-right" style="font-size: 16px;" ></text> </text>
</view>
</view>
</view>
</view>
</template>
<script>
import moment from 'moment'
import get from 'lodash/get'
import set from 'lodash/set'
import pickBy from 'lodash/pickBy'
import mapValues from 'lodash/mapValues'
import common from '@/common/js/common.js'
export default {
data() {
return {
// 表单结构
scheme: {
},
// 筛选菜单值
searchData: {
Sqlparam: 1,
IssueYear: '',
IssueMonth: ''
},
defaultQueryData: {},
queryData: {
keyword: ''
},
// 数据源
dataSource: {
F_CustomerId: []
},
// 页面相关参数
ready: false,
tips: '加载中…',
loadState: '向下翻以加载更多',
sideOpen: false,
// 列表条目与分页信息
page: 1,
total: 2,
list: [],
}
},
async onLoad() {
await this.init()
},
onUnload() {
this.OFF('invoice-list-change')
},
methods: {
// 页面初始化
async init() {
let _this = this;
let date = new Date()
_this.searchData.IssueYear = date.getFullYear();
_this.searchData.IssueMonth = date.getMonth()+1;
this.ON('invoice-list-change', this.refreshList)
await Promise.all([
// 加载 F_CustomerId 字段的数据源:客户信息
// this.FETCH_DATASOURCE('crmCustomer').then(result => {
// this.dataSource.F_CustomerId = result.data.map(t => ({ text: t.f_fullname, value: t.f_customerid }))
// }),
// 拉取列表信息
this.fetchList()
])
this.defaultQueryData = this.COPY(this.queryData)
this.ready = true
},
// 切换时间
timeTap(num) {
let _this = this;
if (num == 1) {
if(_this.searchData.IssueMonth == 1){
_this.searchData.IssueYear = _this.searchData.IssueYear - 1;
_this.searchData.IssueMonth = 12
}else{
_this.searchData.IssueMonth = _this.searchData.IssueMonth - 1;
}
} else {
if(_this.searchData.IssueMonth == 12){
_this.searchData.IssueYear = _this.searchData.IssueYear + 1;
_this.searchData.IssueMonth = 1
}else{
_this.searchData.IssueMonth = _this.searchData.IssueMonth + 1;
}
}
this.fetchList()
},
// 拉取列表
async fetchList(isConcat = true) {
// if (this.page > this.total) {
// return
// }
const result = await this.HTTP_GET(
'learun/adms/JobPerformance/getlist', {
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.list = 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()
})
},
// 点击「编辑」、「查看」、「添加」、「删除」按钮
action(type, item) {
switch (type) {
default:
case 'create':
this.NAV_TO('./single?type=create')
return
case 'view':
this.NAV_TO('./single?type=view&&id=' + item.Id, item, true)
return
case 'edit':
this.NAV_TO('./single?type=edit', item, true)
return
}
},
// 显示列表中的标题项
displayListItem(item, field) {
const fieldItem = this.scheme[field]
const value = item[field]
switch (fieldItem.type) {
case 'currentInfo':
case 'organize':
switch (fieldItem.dataType) {
case 'user':
return get(this.GET_GLOBAL('user'), `${value}.name`, '')
case 'department':
return get(this.GET_GLOBAL('department'), `${value}.name`, '')
case 'company':
return get(this.GET_GLOBAL('company'), `${value}.name`, '')
default:
return value || ''
}
case 'radio':
case 'select':
const selectItem = this.dataSource[field].find(t => t.value === 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 || ''
}
},
// 设置搜索条件
async searchChange() {
const result = {}
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()
},
// 点击跳转到详情页
GoTosingle(type){
let _this = this
if(_this.list.length>0){
uni.navigateTo({
url: './single?type='+type+'&item='+encodeURIComponent(JSON.stringify(_this.list))
});
}else{
uni.showToast({
title: '当月无绩效',
icon: 'none',
duration: 2000
})
}
}
}
}
</script>
<style lang="less" scoped>
@import '~@/common/css/sidepage.less';
@import '~@/common/css/customlist.less';
.customlist-item{
// padding: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
padding-bottom: 0;
border-top: none !important;
}
.customlist-item-field{
padding-left: 10px;
padding-right: 10px;
display: flex;
justify-content: space-between;
align-items: center;
min-height: 52px;
background-color: #ffffff;
justify-content: space-between;
border-bottom: 0.5px solid #eee;
}
.page {
background: #fff;
}
.timeTable_sec1 {
padding: 14px 12px;
text-align: center;
background: #0075c4;
color: #94d4ff;
font-size: 0;
}
.tSec1Box>* {
display: inline-block;
vertical-align: middle;
}
.tSec1Line {
height: 13px;
width: 1px;
background: #94d4ff;
margin: 0 10px;
}
.tSec1Box {
font-size: 15px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
#semester {
margin-bottom: 10px;
}
#weekTime {}
#weekTime text {
margin: 0 10px;
}
.tSec1Box>text {
width: auto;
text-align: center;
line-height: 22px;
}
.tSec1Box image {
width: 15px;
margin-right: 2px;
}
.tSec1Box text:after {
display: none;
}
.item-title{
color: #000;
font-size: 16px;
line-height: 36px;
background: #f1f1f1;
padding-left: 5px;
}
.item-titlewrap{
color: #000;
font-size: 16px;
line-height: 50px;
background: #f1f1f1;
padding:0 10px;
border-bottom: 1rpx solid #ddd;
display: flex;
justify-content: space-between;
}
</style>

+ 442
- 0
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/JobPerformance/single.vue Целия файл

@@ -0,0 +1,442 @@
<template>
<view class="page">
<view v-if="ready">
<view v-if="itemtype == 1">
<view class="item-title">基础岗位分</view>
<l-input
@input="setValue('JobPerformance.AdminPosition', $event)"
:value="getValue('JobPerformance.AdminPosition')"
:disabled="!edit"
title="行政管理岗位"
/>
<l-input
@input="setValue('JobPerformance.LeagueSecretary', $event)"
:value="getValue('JobPerformance.LeagueSecretary')"
:disabled="!edit"
title="团总支书记"
/>
<l-input
@input="setValue('JobPerformance.CenterPeople', $event)"
:value="getValue('JobPerformance.CenterPeople')"
:disabled="!edit"
title="中心负责人"
/>
<l-input
@input="setValue('JobPerformance.TeachingPosition', $event)"
:value="getValue('JobPerformance.TeachingPosition')"
:disabled="!edit"
title="教辅、工勤岗位"
/>
<l-input
@input="setValue('JobPerformance.Director', $event)"
:value="getValue('JobPerformance.Director')"
:disabled="!edit"
title="班主任"
/>
<l-input
@input="setValue('JobPerformance.TeacherWorkRoom', $event)"
:value="getValue('JobPerformance.TeacherWorkRoom')"
:disabled="!edit"
title="名师工作室"
/>
<l-input
@input="setValue('JobPerformance.MajorPeople', $event)"
:value="getValue('JobPerformance.MajorPeople')"
:disabled="!edit"
title="专业负责人、教研/备课组长"
/>
<l-input
@input="setValue('JobPerformance.WorkLeader', $event)"
:value="getValue('JobPerformance.WorkLeader')"
:disabled="!edit"
title="办公组长"
/>
<l-input
@input="setValue('JobPerformance.TrainAdmin', $event)"
:value="getValue('JobPerformance.TrainAdmin')"
:disabled="!edit"
title="实训室类管理员"
/>
<l-input
@input="setValue('JobPerformance.CommitteeMember', $event)"
:value="getValue('JobPerformance.CommitteeMember')"
:disabled="!edit"
title="纪委/支部/工会委员、兼职督学"
/>
<view class="item-title">教学岗位分</view>
<l-input
@input="setValue('JobPerformance.LessonNum', $event)"
:value="getValue('JobPerformance.LessonNum')"
:disabled="!edit"
title="正课节数"
/>
<l-input
@input="setValue('JobPerformance.LessonHour', $event)"
:value="getValue('JobPerformance.LessonHour')"
:disabled="!edit"
title="正课课时分"
/>
<l-input
@input="setValue('JobPerformance.MorningStudyNum', $event)"
:value="getValue('JobPerformance.MorningStudyNum')"
:disabled="!edit"
title="早自习节数"
/>
<l-input
@input="setValue('JobPerformance.MorningStudyHour', $event)"
:value="getValue('JobPerformance.MorningStudyHour')"
:disabled="!edit"
title="早自习课时分"
/>
<l-input
@input="setValue('JobPerformance.NightStudyNum', $event)"
:value="getValue('JobPerformance.NightStudyNum')"
:disabled="!edit"
title="晚自习节数"
/>
<l-input
@input="setValue('JobPerformance.NightStudyHour', $event)"
:value="getValue('JobPerformance.NightStudyHour')"
:disabled="!edit"
title="晚自习课时分"
/>
<l-input
@input="setValue('JobPerformance.TwoExerciseNum', $event)"
:value="getValue('JobPerformance.TwoExerciseNum')"
:disabled="!edit"
title="两操节数"
/>
<l-input
@input="setValue('JobPerformance.TwoExerciseHour', $event)"
:value="getValue('JobPerformance.TwoExerciseHour')"
:disabled="!edit"
title="两操课时分"
/>
<l-input
@input="setValue('JobPerformance.TempWorkDay', $event)"
:value="getValue('JobPerformance.TempWorkDay')"
:disabled="!edit"
title="临时代班天数"
/>
<l-input
@input="setValue('JobPerformance.TempWorkScore', $event)"
:value="getValue('JobPerformance.TempWorkScore')"
:disabled="!edit"
title="临时代班岗位分"
/>
<l-input
@input="setValue('JobPerformance.OffWorkDay', $event)"
:value="getValue('JobPerformance.OffWorkDay')"
:disabled="!edit"
title="缺班天数"
/>
<l-input
@input="setValue('JobPerformance.OffWorkMinusScore', $event)"
:value="getValue('JobPerformance.OffWorkMinusScore')"
:disabled="!edit"
title="临时缺班扣减岗位分"
/>
<view class="item-title">值日岗位分</view>
<l-input
@input="setValue('JobPerformance.OnDutyDay', $event)"
:value="getValue('JobPerformance.OnDutyDay')"
:disabled="!edit"
title="值日天数"
/>
<l-input
@input="setValue('JobPerformance.OnDutyScore', $event)"
:value="getValue('JobPerformance.OnDutyScore')"
:disabled="!edit"
title="值日岗位分"
/>
<view class="item-title">出勤考核</view>
<l-input
@input="setValue('JobPerformance.ShouldWorkDay', $event)"
:value="getValue('JobPerformance.ShouldWorkDay')"
:disabled="!edit"
title="应出勤天数"
/>
<l-input
@input="setValue('JobPerformance.WorkBasicScore', $event)"
:value="getValue('JobPerformance.WorkBasicScore')"
:disabled="!edit"
title="出勤基础分"
/>
<l-input
@input="setValue('JobPerformance.WorkOffCount', $event)"
:value="getValue('JobPerformance.WorkOffCount')"
:disabled="!edit"
title="出勤缺卡次数"
/>
<l-input
@input="setValue('JobPerformance.WorkMinusScore', $event)"
:value="getValue('JobPerformance.WorkMinusScore')"
:disabled="!edit"
title="出勤考核扣减分"
/>
<l-input
@input="setValue('JobPerformance.BigActivityMinusScore', $event)"
:value="getValue('JobPerformance.BigActivityMinusScore')"
:disabled="!edit"
title="大型活动考核扣减分"
/>
<l-input
@input="setValue('JobPerformance.AbsenteeismDay', $event)"
:value="getValue('JobPerformance.AbsenteeismDay')"
:disabled="!edit"
title="旷工天数"
/>
<l-input
@input="setValue('JobPerformance.AbsenteeismMinusScore', $event)"
:value="getValue('JobPerformance.AbsenteeismMinusScore')"
:disabled="!edit"
title="旷工扣减分"
/>
<l-input
@input="setValue('JobPerformance.WorkRemark', $event)"
:value="getValue('JobPerformance.WorkRemark')"
:disabled="!edit"
title="出勤(病事公产活动等)考核情况说明"
/>
<view class="item-title">常规工作考核</view>
<l-input
@input="setValue('JobPerformance.RoutineBasicScore', $event)"
:value="getValue('JobPerformance.RoutineBasicScore')"
:disabled="!edit"
title="常规工作考核基础分"
/>
<l-input
@input="setValue('JobPerformance.RoutineMinusScore', $event)"
:value="getValue('JobPerformance.RoutineMinusScore')"
:disabled="!edit"
title="常规工作考核扣减分"
/>
<l-input
@input="setValue('JobPerformance.RoutineRemark', $event)"
:value="getValue('JobPerformance.RoutineRemark')"
:disabled="!edit"
title="常规工作考核情况详细说明"
/>
<view class="item-title">假期工作绩效</view>
<l-input
@input="setValue('JobPerformance.HolidayJobPerformance', $event)"
:value="getValue('JobPerformance.HolidayJobPerformance')"
:disabled="!edit"
title="假期工作绩效"
/>
</view>
</view>
</view>
</template>
<script>
/*
* 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 上海力软信息技术有限公司
* 创建人:超级管理员
* 日 期:2020-10-16 15:39
* 描 述:工作绩效
*/
/**
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录:
* { "path": "pages/EducationalAdministration/JournalSend/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: {
JobPerformance: {
// Id
// 处室Department
Department: { type: 'text', title: '处室'},
// 姓名EmpName
EmpName: { type: 'text', title: '姓名' },
// 岗位名称Post
Post: { type: 'text', title: '岗位名称' },
// 行政管理岗位AdminPosition
AdminPosition: { type: 'text', title: '行政管理岗位'},
// 团总支书记LeagueSecretary
LeagueSecretary: { type: 'text', title: '团总支书记'},
// 中心负责人CenterPeople
CenterPeople: { type: 'text', title: '中心负责人'},
// 教辅、工勤岗位TeachingPosition
TeachingPosition: { type: 'text', title: '教辅、工勤岗位'},
// 班主任Director
Director: { type: 'text', title: '班主任'},
// 名师工作室TeacherWorkRoom
TeacherWorkRoom: { type: 'text', title: '名师工作室'},
// 专业负责人、教研/备课组长MajorPeople
MajorPeople: { type: 'text', title: '专业负责人、教研/备课组长'},
// 办公组长WorkLeader
WorkLeader: { type: 'text', title: '办公组长'},
// 实训室类管理员TrainAdmin
TrainAdmin: { type: 'text', title: '实训室类管理员'},
// 纪委/支部/工会委员、兼职督学CommitteeMember
CommitteeMember: { type: 'text', title: '纪委/支部/工会委员、兼职督学'},
// 正课节数LessonNum
LessonNum: { type: 'text', title: '正课节数'},
// 正课课时分RoutineMinusScore
LessonHour: { type: 'text', title: '正课课时分'},
// 早自习节数MorningStudyNum
MorningStudyNum: { type: 'text', title: '早自习节数'},
// 早自习课时分MorningStudyHour
MorningStudyHour: { type: 'text', title: '早自习课时分'},
// 晚自习节数NightStudyNum
NightStudyNum: { type: 'text', title: '晚自习节数'},
// 晚自习课时分NightStudyHour
NightStudyHour: { type: 'text', title: '晚自习课时分'},
// 两操节数TwoExerciseNum
TwoExerciseNum: { type: 'text', title: '两操节数'},
// 两操课时分TwoExerciseHour
TwoExerciseHour: { type: 'text', title: '两操课时分'},
// 临时代班天数TempWorkDay
TempWorkDay: { type: 'text', title: '临时代班天数'},
// 临时代班岗位分TempWorkScore
TempWorkScore: { type: 'text', title: '临时代班岗位分'},
// 缺班天数OffWorkDay
OffWorkDay: { type: 'text', title: '缺班天数'},
// 临时缺班扣减岗位分OffWorkMinusScore
OffWorkMinusScore: { type: 'text', title: '临时缺班扣减岗位分'},
OnDutyDay:{ type: 'text', title: '值日天数'},
OnDutyScore: { type: 'text', title: '值日岗位分'},
// 应出勤天数ShouldWorkDay
ShouldWorkDay: { type: 'text', title: '应出勤天数'},
// 出勤基础分WorkBasicScore
WorkBasicScore: { type: 'text', title: '出勤基础分'},
// 出勤缺卡次数WorkOffCount
WorkOffCount: { type: 'text', title: '出勤缺卡次数'},
// 出勤考核扣减分WorkMinusScore
WorkMinusScore: { type: 'text', title: '出勤考核扣减分'},
// 大型活动考核扣减分BigActivityMinusScore
BigActivityMinusScore: { type: 'text', title: '大型活动考核扣减分'},
// 旷工天数AbsenteeismDay
AbsenteeismDay: { type: 'text', title: '旷工天数'},
// 旷工扣减分AbsenteeismMinusScore
AbsenteeismMinusScore: { type: 'text', title: '旷工扣减分'},
// 出勤(病事公产活动等)考核情况说明WorkRemark
WorkRemark: { type: 'text', title: '出勤(病事公产活动等)考核情况说明'},
// 常规工作考核基础分RoutineBasicScore
RoutineBasicScore: { type: 'text', title: '常规工作考核基础分'},
// 常规工作考核扣减分RoutineMinusScore
RoutineMinusScore: { type: 'text', title: '常规工作考核扣减分'},
// 常规工作考核情况详细说明RoutineRemark
RoutineRemark: { type: 'text', title: '常规工作考核情况详细说明'},
// 月绩效考核分合计PerformanceTotalScore
PerformanceTotalScore: { type: 'text', title: '月绩效考核分合计'},
// 假期工作绩效HolidayJobPerformance
HolidayJobPerformance: { type: 'text', title: '假期工作绩效'},
// CreateUser
CreateUser: { type: 'text', title: '创建用户'},
// CreateTime
CreateTime: { type: 'text', title: '创建时间'},
// UpdateUser
// UpdateTime
// 发放月份IssueMonth
IssueMonth: { type: 'text', title: '发放月份'},
// 发放年份IssueYear
IssueYear: { type: 'text', title: '发放年份'},
},
},
// 数据源
dataSource: {
},
itemtitle:'',
itemfrom:'',
itemtype:''
}
},
async onLoad(option) {
const item = JSON.parse(decodeURIComponent(option.item));
this.itemtype = option.type
this.itemfrom = item[0]
await this.init()
},
methods: {
// 页面初始化
async init(type, id) {
this.LOADING('加载数据中...')
// 拉取表单数据,同时拉取所有来自数据源的选单数据
await Promise.all([
() => {}
])
await this.fetchForm()
this.ready = true
this.HIDE_LOADING()
},
// 加载表单数据
async fetchForm() {
let originitem = {
JobPerformance : this.itemfrom
}
this.origin = await this.formatFormData(originitem)
this.current = this.COPY(this.origin)
},
// 获取表单值
getValue(path) {
return get(this.current, path)
},
// 设置表单值
setValue(path, val) {
set(this.current, path, val)
}
}
}
</script>
<style>
.item-title{
color: #000;
font-size: 16px;
line-height: 36px;
padding-left: 15px;
}
.top-15{
margin-top: 8px;
}
</style>

Зареждане…
Отказ
Запис