Kaynağa Gözat

app2.0:宿舍考勤

临城职教中职
dyy 2 yıl önce
ebeveyn
işleme
6173d17f5e
3 değiştirilmiş dosya ile 325 ekleme ve 59 silme
  1. +4
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js
  2. +73
    -15
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Acc_DailyAssess/list.vue
  3. +248
    -42
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Acc_DailyAssess/single.vue

+ 4
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js Dosyayı Görüntüle

@@ -21,11 +21,13 @@ export default {
// "http://192.168.2.98:8088/"
// ],
"apiHost": [
"http://cyzjzx.gnway.cc:29615/"
//"http://cyzjzx.gnway.cc:29615/"
// "http://cyzjzx.gnway.cc:30626/"
"http://192.168.10.31:8088/"
],
// "webHost":"http://cyzjzx.gnway.cc:29618/",
"webHost":"http://wxd3f.cyzjzx.com/",
//"webHost":"http://wxd3f.cyzjzx.com/",
"webHost":"http://192.168.10.31:8087/",
// 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示
"devAccount": [
// 20201130230 21364200000400266 老师 420528196310072253 学生 420528200606205026 420528200507261428


+ 73
- 15
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Acc_DailyAssess/list.vue Dosyayı Görüntüle

@@ -104,7 +104,7 @@
/>
<l-select
v-model="queryData.MajorNo"
@change="searchChange"
@change="MajorNoChange"
:range="dataSource.MajorNo"
title ="专业"
placeholder="按专业查询"
@@ -118,21 +118,21 @@
/>
<l-select
v-model="queryData.Dormitory"
@change="searchChange"
@change="DormitoryChange"
:range="dataSource.Dormitory"
title ="宿舍楼"
placeholder="按宿舍楼查询"
/>
<l-select
v-model="queryData.Unit"
@change="searchChange"
@change="UnitChange"
:range="dataSource.Unit"
title ="单元"
placeholder="按单元查询"
/>
<l-select
v-model="queryData.Floor"
@change="searchChange"
@change="FloorChange"
:range="dataSource.Floor"
title ="楼层"
placeholder="按楼层查询"
@@ -354,16 +354,7 @@ export default {
this.searchData = result
await this.refreshList()
},
//todo:
async DeptNoChange(){
console.log(this.dataSource.DeptNo);
console.log(this.dataSource.MajorNo);
this.dataSource.MajorNo=[];
console.log(this.dataSource.MajorNo);
this.dataSource.ClassNo=[];
this.searchChange()
},
// 点击「清空查询条件」按钮
reset() {
this.$refs.datefilter.changeDateRange('all')
@@ -429,7 +420,74 @@ export default {
default: return value === null || value === undefined ? '' : value
}
}
},
//多条件查询:专业部改变事件
async DeptNoChange(){
if (this.queryData.DeptNo != null && this.queryData.DeptNo!=undefined && this.queryData.DeptNo != "") {
this.FETCH_DATASOURCE('CdMajorInfo').then(result => {
this.dataSource.MajorNo = result.data.filter(t=>t.deptno===this.queryData.DeptNo).map(t => ({ text: t.majorname, value: t.majorno }))
})
}else{
this.FETCH_DATASOURCE('CdMajorInfo').then(result => {
this.dataSource.MajorNo = result.data.map(t => ({ text: t.majorname, value: t.majorno }))
})
}
this.searchChange()
},
//多条件查询:专业改变事件
async MajorNoChange(){
if (this.queryData.MajorNo != null && this.queryData.MajorNo!=undefined && this.queryData.MajorNo != "") {
this.FETCH_DATASOURCE('bjsj').then(result => {
this.dataSource.ClassNo = result.data.filter(t=>t.majorno===this.queryData.MajorNo).map(t => ({ text: t.classname, value: t.classno }))
})
}else{
this.FETCH_DATASOURCE('bjsj').then(result => {
this.dataSource.ClassNo = result.data.map(t => ({ text: t.classname, value: t.classno }))
})
}
this.searchChange()
},
//多条件查询:宿舍楼改变事件
async DormitoryChange(){
if (this.queryData.Dormitory != null && this.queryData.Dormitory!=undefined && this.queryData.Dormitory != "") {
this.FETCH_DATASOURCE('Acc_UnitData').then(result => {
this.dataSource.Unit = result.data.filter(t=>t.parentid===this.queryData.Dormitory).map(t => ({ text: t.name, value: t.id }))
})
}else{
this.FETCH_DATASOURCE('Acc_UnitData').then(result => {
this.dataSource.Unit = result.data.map(t => ({ text: t.name, value: t.id }))
})
}
this.searchChange()
},
//多条件查询:单元改变事件
async UnitChange(){
if (this.queryData.Unit != null && this.queryData.Unit!=undefined && this.queryData.Unit != "") {
this.FETCH_DATASOURCE('Acc_FloorData').then(result => {
this.dataSource.Floor = result.data.filter(t=>t.parentid===this.queryData.Unit).map(t => ({ text: t.name, value: t.id }))
})
}else{
this.FETCH_DATASOURCE('Acc_FloorData').then(result => {
this.dataSource.Floor = result.data.map(t => ({ text: t.name, value: t.id }))
})
}
this.searchChange()
},
//多条件查询:楼层改变事件
async FloorChange(){
if (this.queryData.Floor != null && this.queryData.Floor!=undefined && this.queryData.Floor != "") {
this.FETCH_DATASOURCE('Acc_RoomData').then(result => {
this.dataSource.RId = result.data.filter(t=>t.parentid===this.queryData.Floor).map(t => ({ text: t.name, value: t.id }))
})
}else{
this.FETCH_DATASOURCE('Acc_RoomData').then(result => {
this.dataSource.RId = result.data.map(t => ({ text: t.name, value: t.id }))
})
}
this.searchChange()
},
}
}


+ 248
- 42
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Acc_DailyAssess/single.vue Dosyayı Görüntüle

@@ -2,45 +2,138 @@
<view class="page">
<view v-if="ready">
<l-select
@input="setValue('ClassWork.ClassNo', $event)"
:value="getValue('ClassWork.ClassNo')"
@input="setValue('Acc_DailyAssess.Dormitory', $event)"
:value="getValue('Acc_DailyAssess.Dormitory')"
:disabled="!edit"
:range="dataSource.ClassWork.ClassNo"
title="班级"
:range="dataSource.Acc_DailyAssess.Dormitory"
@change="DormitoryChange"
title="宿舍楼"
required
/>
<l-select
@input="setValue('Acc_DailyAssess.Unit', $event)"
:value="getValue('Acc_DailyAssess.Unit')"
:disabled="!edit"
:range="dataSource.Acc_DailyAssess.Unit"
@change="UnitChange"
title="单元"
required
/>
<l-select
@input="setValue('Acc_DailyAssess.Floor', $event)"
:value="getValue('Acc_DailyAssess.Floor')"
:disabled="!edit"
:range="dataSource.Acc_DailyAssess.Floor"
@change="FloorChange"
title="楼层"
required
/>
<l-select
@input="setValue('Acc_DailyAssess.RId', $event)"
:value="getValue('Acc_DailyAssess.RId')"
:disabled="!edit"
:range="dataSource.Acc_DailyAssess.RId"
title="宿舍"
required
/>
<l-select
@input="setValue('Acc_DailyAssess.DeptNo', $event)"
:value="getValue('Acc_DailyAssess.DeptNo')"
:disabled="!edit"
:range="dataSource.Acc_DailyAssess.DeptNo"
@change="DeptNoChange"
title="专业部"
required
/>
<l-select
@input="setValue('Acc_DailyAssess.MajorNo', $event)"
:value="getValue('Acc_DailyAssess.MajorNo')"
:disabled="!edit"
:range="dataSource.Acc_DailyAssess.MajorNo"
@change="MajorNoChange"
title="专业"
required
/>
<l-select
@input="setValue('Acc_DailyAssess.ClassNo', $event)"
:value="getValue('Acc_DailyAssess.ClassNo')"
:disabled="!edit"
:range="dataSource.Acc_DailyAssess.ClassNo"
title="班级"
required
/>
<l-select
@input="setValue('Acc_DailyAssess.StuNo', $event)"
:value="getValue('Acc_DailyAssess.StuNo')"
:disabled="!edit"
:range="dataSource.Acc_DailyAssess.StuNo"
title="学生"
required
/>
<l-date-picker
@input="setValue('ClassWork.Date', $event)"
:value="getValue('ClassWork.Date')"
@input="setValue('Acc_DailyAssess.Date', $event)"
:value="getValue('Acc_DailyAssess.Date')"
:disabled="!edit"
title="日期"
required
/>
<l-input
@input="setValue('ClassWork.Title', $event)"
:value="getValue('ClassWork.Title')"
@input="setValue('Acc_DailyAssess.AddScoreHealth', $event)"
:value="getValue('Acc_DailyAssess.AddScoreHealth')"
:disabled="!edit"
title="标题"
title="卫生奖分"
/>
<l-input
@input="setValue('Acc_DailyAssess.MinusScoreHealth', $event)"
:value="getValue('Acc_DailyAssess.MinusScoreHealth')"
:disabled="!edit"
title="卫生扣分"
/>
<l-input
@input="setValue('Acc_DailyAssess.AddScore', $event)"
:value="getValue('Acc_DailyAssess.AddScore')"
:disabled="!edit"
title="纪律奖分"
/>
<l-input
@input="setValue('Acc_DailyAssess.MinusScore', $event)"
:value="getValue('Acc_DailyAssess.MinusScore')"
:disabled="!edit"
title="纪律扣分"
/>
<l-textarea
@input="setValue('ClassWork.Content', $event)"
:value="getValue('ClassWork.Content')"
@input="setValue('Acc_DailyAssess.Reason', $event)"
:value="getValue('Acc_DailyAssess.Reason')"
:readonly="!edit"
title="工作内容"
title="奖扣分原因"
required
/>
<!-- 附件上传 -->
<!-- todo: -->
<l-upload-file
@input="setValue('Acc_DailyAssess.Files', $event)"
:value="getValue('Acc_DailyAssess.Files')"
:readonly="!edit"
:number="3"
title="附件上传"
/>
</view>
<view v-if="ready" class="bg-white margin-tb padding" style="padding-top: 0; overflow: hidden;">
<l-button v-if="edit" @click="action('save')" size="lg" color="green" class="block margin-top" block>
提交保存
</l-button>
<l-button v-if="!edit && mode !== 'create'" @click="action('edit')" size="lg" line="orange" class="block margin-top" block>
<!-- <l-button v-if="!edit && mode !== 'create'" @click="action('edit')" size="lg" line="orange" class="block margin-top" block>
编辑本页
</l-button>
</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 v-if="!edit && mode !== 'create'" @click="action('delete')" size="lg" line="red" class="block margin-top" block>
删除
</l-button>
</l-button> -->
</view>
</view>
</template>
@@ -51,14 +144,14 @@
* 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 上海力软信息技术有限公司
* 创建人:超级管理员
* 日 期:2020-10-20 09:37
* 描 述:班级工作记事
* 日 期:2022-09-13 09:37
* 描 述:寝室日常考核管理
*/
/**
* 本段代码由移动端代码生成器输出,移动端须 2.2.0 版本及以上可以使用
* 请在移动端 /pages.json 中的 pages 字段中添加一条记录:
* { "path": "pages/PersonnelManagement/ClassWork/single", "style": { "navigationBarTitleText": "表单详情页" } }
* { "path": "pages/LogisticsManagement/Acc_DailyAssess/single", "style": { "navigationBarTitleText": "表单详情页" } }
*
* (navigationBarTitleText 字段为本页面的标题文本,可以修改)
* (必须自行操作该步骤,力软代码生成器不会自动帮您修改 /pages.json 文件)
@@ -86,19 +179,37 @@ export default {
// 表单项数据结构
scheme: {
ClassWork: {
ClassNo: { type: 'select', title: '班级', dataSource: '1', dataSourceId: 'bjsj,classname,classno' },
Date: { type: 'datetime', title: '日期', dateformat: '0' },
Title: { type: 'text', title: '标题' },
Content: { type: 'textarea', title: '工作内容' },
Acc_DailyAssess: {
DeptNo: { type: 'select', title: '专业部', dataSource: '1', dataSourceId: 'CdDeptInfo,deptname,deptno', verify: 'NotNull' },
MajorNo: { type: 'select', title: '专业', dataSource: '1', dataSourceId: 'CdMajorInfo,majorname,majorno', verify: 'NotNull' },
ClassNo: { type: 'select', title: '班级', dataSource: '1', dataSourceId: 'bjsj,classname,classno', verify: 'NotNull' },
Dormitory: { type: 'select', title: '宿舍楼', dataSource: '1', dataSourceId: 'Acc_DormitoryData,name,id', verify: 'NotNull' },
Unit: { type: 'select', title: '单元', dataSource: '1', dataSourceId: 'Acc_UnitData,name,id', verify: 'NotNull' },
Floor: { type: 'select', title: '楼层', dataSource: '1', dataSourceId: 'Acc_FloorData,name,id' , verify: 'NotNull' },
RId: { type: 'select', title: '宿舍', dataSource: '1', dataSourceId: 'Acc_RoomData,name,id' , verify: 'NotNull'},
StuNo: { type: 'select', title: '学生', dataSource: '1', dataSourceId: 'StuInfoBasic,stuname,stuno', verify: 'NotNull' },
Date: { type: 'datetime', title: '日期', dateformat: '0' , verify: 'NotNull'},
AddScoreHealth: { type: 'text', title: '卫生奖分' },
MinusScoreHealth: { type: 'text', title: '卫生扣分' },
AddScore: { type: 'text', title: '纪律奖分' },
MinusScore: { type: 'text', title: '纪律扣分' },
Reason: { type: 'textarea', title: '奖扣分原因' , verify: 'NotNull'},
Files: { type: "upload", title: "附件上传" },
},
},
// 数据源
dataSource: {
ClassWork: {
ClassNo: [],
Acc_DailyAssess: {
DeptNo: [],
MajorNo: [],
ClassNo: [],
Dormitory: [],
Unit: [],
Floor: [],
RId: [],
StuNo:[],
},
}
@@ -119,14 +230,35 @@ export default {
this.edit = ['create', 'edit'].includes(this.mode)
// 拉取表单数据,同时拉取所有来自数据源的选单数据
await Promise.all([
this.FETCH_DATASOURCE('bjsj').then(result => {
this.dataSource.ClassWork.ClassNo = result.data.map(t => ({ text: t.classname, value: t.classno }))
}),
() => {}
])
await Promise.all([
this.FETCH_DATASOURCE('CdDeptInfo').then(result => {
this.dataSource.Acc_DailyAssess.DeptNo = result.data.map(t => ({ text: t.deptname, value: t.deptno }))
}),
this.FETCH_DATASOURCE('CdMajorInfo').then(result => {
this.dataSource.Acc_DailyAssess.MajorNo = result.data.map(t => ({ text: t.majorname, value: t.majorno }))
}),
this.FETCH_DATASOURCE('bjsj').then(result => {
this.dataSource.Acc_DailyAssess.ClassNo = result.data.map(t => ({ text: t.classname, value: t.classno }))
}),
this.FETCH_DATASOURCE('Acc_DormitoryData').then(result => {
this.dataSource.Acc_DailyAssess.Dormitory = result.data.map(t => ({ text: t.name, value: t.id }))
}),
this.FETCH_DATASOURCE('Acc_UnitData').then(result => {
this.dataSource.Acc_DailyAssess.Unit = result.data.map(t => ({ text: t.name, value: t.id }))
}),
this.FETCH_DATASOURCE('Acc_FloorData').then(result => {
this.dataSource.Acc_DailyAssess.Floor = result.data.map(t => ({ text: t.name, value: t.id }))
}),
this.FETCH_DATASOURCE('Acc_RoomData').then(result => {
this.dataSource.Acc_DailyAssess.RId = result.data.map(t => ({ text: t.name, value: t.id }))
}),
this.FETCH_DATASOURCE('StuInfoBasic').then(result => {
this.dataSource.Acc_DailyAssess.StuNo = result.data.map(t => ({ text: t.stuname, value: t.stuno }))
}),
() => {}
])
await this.fetchForm()
this.ready = true
@@ -138,7 +270,7 @@ export default {
if (this.mode === 'create') {
this.origin = await this.getDefaultForm()
} else {
const result = await this.HTTP_GET('learun/adms/PersonnelManagement/ClassWork/form', this.id)
const result = await this.HTTP_GET('learun/adms/LogisticsManagement/Acc_DailyAssess/form', this.id)
this.origin = await this.formatFormData(result)
}
this.current = this.COPY(this.origin)
@@ -157,7 +289,13 @@ export default {
break
case 'save':
const postData = await this.getPostData(this.id)
console.log(postData);
const verifyResult = this.verifyForm()
console.log(verifyResult);
if (verifyResult.length > 0) {
this.CONFIRM('表单验证失败', verifyResult.join('\n'))
return
@@ -166,17 +304,23 @@ export default {
if (!(await this.CONFIRM('提交确认', '确定要提交本页表单内容吗?', true))) {
return
}
this.LOADING('正在提交...')
const postData = await this.getPostData(this.id)
this.HTTP_POST('learun/adms/PersonnelManagement/ClassWork/save', postData, '表单提交保存失败').then(success => {
//const postData = await this.getPostData(this.id)
//console.log(postData);
return false;
this.HTTP_POST('learun/adms/LogisticsManagement/Acc_DailyAssess/save', postData, '表单提交保存失败').then(success => {
this.HIDE_LOADING()
if (!success) {
return
}
this.EMIT('PersonnelManagementClassWork-list-change')
this.EMIT('LogisticsManagementAcc_DailyAssess-list-change')
this.NAV_BACK()
this.TOAST('提交保存成功')
})
@@ -188,13 +332,13 @@ export default {
}
this.LOADING('提交删除中...')
this.HTTP_POST('learun/adms/PersonnelManagement/ClassWork/delete', this.id, '删除失败').then(success => {
this.HTTP_POST('learun/adms/LogisticsManagement/Acc_DailyAssess/delete', this.id, '删除失败').then(success => {
this.HIDE_LOADING()
if (!success) {
return
}
this.EMIT('PersonnelManagementClassWork-list-change')
this.EMIT('LogisticsManagementAcc_DailyAssess-list-change')
this.NAV_BACK()
this.this.TOAST('删除成功', 'success')
})
@@ -212,7 +356,69 @@ export default {
// 设置表单值
setValue(path, val) {
set(this.current, path, val)
}
},
//多条件查询:宿舍楼改变事件
async DormitoryChange(){
if (this.getValue('Acc_DailyAssess.Dormitory') != null && this.getValue('Acc_DailyAssess.Dormitory') !=undefined && this.getValue('Acc_DailyAssess.Dormitory') != "") {
this.FETCH_DATASOURCE('Acc_UnitData').then(result => {
this.dataSource.Acc_DailyAssess.Unit = result.data.filter(t=>t.parentid===this.getValue('Acc_DailyAssess.Dormitory') ).map(t => ({ text: t.name, value: t.id }))
})
}else{
this.FETCH_DATASOURCE('Acc_UnitData').then(result => {
this.dataSource.Acc_DailyAssess.Unit = result.data.map(t => ({ text: t.name, value: t.id }))
})
}
},//多条件查询:单元改变事件
async UnitChange(){
if (this.getValue('Acc_DailyAssess.Unit') != null && this.getValue('Acc_DailyAssess.Unit')!=undefined && this.getValue('Acc_DailyAssess.Unit')!= "") {
this.FETCH_DATASOURCE('Acc_FloorData').then(result => {
this.dataSource.Acc_DailyAssess.Floor = result.data.filter(t=>t.parentid===this.getValue('Acc_DailyAssess.Unit')).map(t => ({ text: t.name, value: t.id }))
})
}else{
this.FETCH_DATASOURCE('Acc_FloorData').then(result => {
this.dataSource.Acc_DailyAssess.Floor = result.data.map(t => ({ text: t.name, value: t.id }))
})
}
},
//多条件查询:楼层改变事件
async FloorChange(){
if (this.getValue('Acc_DailyAssess.Floor') != null && this.getValue('Acc_DailyAssess.Floor')!=undefined && this.getValue('Acc_DailyAssess.Floor') != "") {
this.FETCH_DATASOURCE('Acc_RoomData').then(result => {
this.dataSource.Acc_DailyAssess.RId = result.data.filter(t=>t.parentid===this.getValue('Acc_DailyAssess.Floor')).map(t => ({ text: t.name, value: t.id }))
})
}else{
this.FETCH_DATASOURCE('Acc_RoomData').then(result => {
this.dataSource.Acc_DailyAssess.RId = result.data.map(t => ({ text: t.name, value: t.id }))
})
}
},
//多条件查询:专业部改变事件
async DeptNoChange(){
if (this.getValue('Acc_DailyAssess.DeptNo') != null && this.getValue('Acc_DailyAssess.DeptNo')!=undefined && this.getValue('Acc_DailyAssess.DeptNo') != "") {
this.FETCH_DATASOURCE('CdMajorInfo').then(result => {
this.dataSource.Acc_DailyAssess.MajorNo = result.data.filter(t=>t.deptno===this.getValue('Acc_DailyAssess.DeptNo')).map(t => ({ text: t.majorname, value: t.majorno }))
})
}else{
this.FETCH_DATASOURCE('CdMajorInfo').then(result => {
this.dataSource.Acc_DailyAssess.MajorNo = result.data.map(t => ({ text: t.majorname, value: t.majorno }))
})
}
},
//多条件查询:专业改变事件
async MajorNoChange(){
if (this.getValue('Acc_DailyAssess.MajorNo') != null && this.getValue('Acc_DailyAssess.MajorNo')!=undefined && this.getValue('Acc_DailyAssess.MajorNo') != "") {
this.FETCH_DATASOURCE('bjsj').then(result => {
this.dataSource.Acc_DailyAssess.ClassNo = result.data.filter(t=>t.majorno===this.getValue('Acc_DailyAssess.MajorNo')).map(t => ({ text: t.classname, value: t.classno }))
})
}else{
this.FETCH_DATASOURCE('bjsj').then(result => {
this.dataSource.Acc_DailyAssess.ClassNo = result.data.map(t => ({ text: t.classname, value: t.classno }))
})
}
},
}
}
</script>

Yükleniyor…
İptal
Kaydet