diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js index 7612e8b03..d84f34b6f 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -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 diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Acc_DailyAssess/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Acc_DailyAssess/list.vue index 02414c8fd..c7b5a363c 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Acc_DailyAssess/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Acc_DailyAssess/list.vue @@ -104,7 +104,7 @@ /> { + 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() + }, + } } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Acc_DailyAssess/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Acc_DailyAssess/single.vue index c87499251..8df91cf0f 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Acc_DailyAssess/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/LogisticsManagement/Acc_DailyAssess/single.vue @@ -2,45 +2,138 @@ + + + + + + + + + + + + + + + 提交保存 - + 取消编辑 - + @@ -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 })) + }) + } + }, + + } } \ No newline at end of file