From 08a4aa6cf05c02d07b6cb8616ff9e6f90fe5d2ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E7=90=AA?= Date: Thu, 1 Sep 2022 15:09:21 +0800 Subject: [PATCH 1/3] =?UTF-8?q?app2.0=20=E6=96=B0=E7=94=9F=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=AE=8C=E5=96=84=20=E5=BC=BA=E5=88=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../learun-mpui/learun-ui-mp/upload.vue | 62 ++++++---------- .../components/upload-file.vue | 65 ----------------- .../DutySchedule/single.vue | 2 +- .../LearunApp-2.2.0/pages/my/newpassword.vue | 21 +++--- .../LearunApp-2.2.0/pages/weixinLogin.vue | 26 +++---- .../LearunApp-2.2.0/pages/welcome/list.vue | 70 +++++++++++++++---- .../LearunApp-2.2.0/pages/wxLogin.vue | 29 ++++---- 7 files changed, 118 insertions(+), 157 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-mpui/learun-ui-mp/upload.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-mpui/learun-ui-mp/upload.vue index 4e0989faa..2dfbe1832 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-mpui/learun-ui-mp/upload.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-mpui/learun-ui-mp/upload.vue @@ -7,10 +7,10 @@ :key="index" class="bg-img" > - + @@ -40,6 +40,12 @@ export default { number: { default: 1 }, readonly: {}, value: { default: () => [] }, + size:{ + default: 20 + },//MB + type:{ + default: "all" + } }, data(){ @@ -116,34 +122,6 @@ export default { }) }, - /** - * @description 控制promise.all并发数量 - * @param limit 并发数 - * @param array 参数列表 - * @param apiFn 执行函数 - * @returns {Promise[]>} - */ - async promiseAllLimit(limit, array, apiFn) { - const ret = [] // 用于存放所有的promise实例 - const executing = [] // 用于存放目前正在执行的promise - for (const item of array) { - const p = apiFn(item) - ret.push(p) - if (limit <= array.length) { - // then回调中,当这个promise状态变为fulfilled后,将其从正在执行的promise列表executing中删除 - const e = p.then(() => executing.splice(executing.indexOf(e), 1)) - executing.push(e) - if (executing.length >= limit) { - // 一旦正在执行的promise列表数量等于限制数,就使用Promise.race等待某一个promise状态发生变更, - // 状态变更后,就会执行上面then的回调,将该promise从executing中删除, - // 然后再进入到下一次for循环,生成新的promise进行补充 - await Promise.race(executing) - } - } - } - return Promise.all(ret) - }, - imgToBase64(url){ return new Promise((resolve,reject)=>{ if(!url){ @@ -167,18 +145,19 @@ export default { }, validate(array){ - // let type = array.every(item=>{ - // return item.type && item.type.substring(0,6) == "image/" - // }) - // if(!type){ - // this.TOAST('文件类型错误'); - // return false - // } + let type = this.type!="all"?array.every(item=>{ + return this.type.split(",").includes(item.type) + }):true + if(!type){ + this.TOAST('文件格式错误'); + return false + } + console.log(array,this.size *1024 *1024) let size = array.every(item=>{ - return item.size && item.size <= 100 * 1024 * 1024 + return item.size && item.size <= this.size *1024 *1024 }) if(!size){ - this.TOAST('文件大小不得超过100M'); + this.TOAST('文件大小不能超过'+this.size+'M'); return false } return true @@ -186,8 +165,8 @@ export default { viewImg(index) { uni.previewImage({ - urls: this.imgList.map(item=>item.id?this.CONFIG('webHost')+item.url:item.url), - current: this.imgList[index].id?this.CONFIG('webHost')+this.imgList[index].url:this.imgList[index].url, + urls: this.imgList.map(item=>item.url), + current: this.imgList[index].url, }); }, @@ -219,7 +198,6 @@ export default { // }, }, created() { - console.log(123) this.imgList = JSON.parse(JSON.stringify(this.value.map(item=>{ item.isUploaded = true return item diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/upload-file.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/upload-file.vue index f3947f199..a222f13f4 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/upload-file.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/upload-file.vue @@ -132,71 +132,6 @@ }, - ceshi() { - function apiFn(params) { - return new Promise((resolve, reject) => { - this.LOADING('正在上传…'); - this.HTTP_UPLOAD2('StuInfoFresh/upload', params.url, { - folderId: this.folderId - }).then((data) => { - this.HIDE_LOADING(); - if (data) { - // this.HTTP_GET('StuInfoFresh/upload', {fileId:data}) - this.imgList[params.index] = [{ - id: data.F_Id, - name: data.F_FileName, - url: data.F_FilePath, - type: data.F_FileType - }] - reslove(this.imgList[params.index]) - } else { - reject('上传失败!') - } - }) - }) - } - let array = this.imgList.map(item => { - if (item.id) { - return "" - } else { - return { - url: "learun/adms/annexes/upload" - } - } - }) - this.promiseAllLimit(2, [1, 2, 3, 4, 5, 6, 7, 8, 9], a).then(res => { - console.log(res) - }) - }, - - /** - * @description 控制promise.all并发数量 - * @param limit 并发数 - * @param array 参数列表 - * @param apiFn 执行函数 - * @returns {Promise[]>} - */ - async promiseAllLimit(limit, array, apiFn) { - const ret = [] // 用于存放所有的promise实例 - const executing = [] // 用于存放目前正在执行的promise - for (const item of array) { - const p = apiFn(item) - ret.push(p) - if (limit <= array.length) { - // then回调中,当这个promise状态变为fulfilled后,将其从正在执行的promise列表executing中删除 - const e = p.then(() => executing.splice(executing.indexOf(e), 1)) - executing.push(e) - if (executing.length >= limit) { - // 一旦正在执行的promise列表数量等于限制数,就使用Promise.race等待某一个promise状态发生变更, - // 状态变更后,就会执行上面then的回调,将该promise从executing中删除, - // 然后再进入到下一次for循环,生成新的promise进行补充 - await Promise.race(executing) - } - } - } - return Promise.all(ret) - }, - validate(array) { // let type = array.every(item=>{ // return item.type && item.type.substring(0,6) == "image/" diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/DutySchedule/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/DutySchedule/single.vue index 718a3a09e..61d7412fb 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/DutySchedule/single.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/PersonnelManagement/DutySchedule/single.vue @@ -81,7 +81,7 @@ export default { scheme: { DutySchedule: { Date: { type: 'datetime', title: '时间', dateformat: '0' }, - Person: { type: 'text', title: '值班人' }, + Person: { type: 'text', title: '值班人',verify: 'NotNull', }, Remark: { type: 'textarea', title: '备注' }, }, diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/newpassword.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/newpassword.vue index 7995d39d8..4bb8deece 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/newpassword.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/my/newpassword.vue @@ -1,8 +1,8 @@ @@ -81,7 +87,7 @@ export default { data() { return { photo:[], - fileList:[], + // fileList:[], uploadVisiable:false, imgSrc: '', scheme: { @@ -99,7 +105,8 @@ export default { dataSource:{ GenderNo: Object.values(this.GET_GLOBAL('dataDictionary').usersex).map(t => ({ value: t.value, text: t.text })), FamilyRelation: Object.values(this.GET_GLOBAL('dataDictionary').FamilyRelation).map(t => ({ value: t.value, text: t.text })), - PartyFaceNo:[] + PartyFaceNo:[], + ResidenceNo:Object.values(this.GET_GLOBAL('dataDictionary').ResidenceNo).map(t => ({ value: t.value, text: t.text })), }, StuInfoFreshFamilyEntities:{ Name: '', @@ -128,7 +135,7 @@ export default { }; }, methods: { - init() { + async init() { // console.log(this.API) let _this = this; Promise.all([ @@ -142,7 +149,7 @@ export default { () => {} ]); _this.LOADING('加载数据…'); - _this.HTTP_GET('StuInfoFresh/stuInfoFreshEntity', _this.userInfo.account, '加载数据时出错').then(res => { + _this.HTTP_GET('StuInfoFresh/stuInfoFreshEntity', _this.userInfo.account, '加载数据时出错').then(async(res)=> { this.HIDE_LOADING(); _this.StuInfoFreshEntity = _this.COPY(res.StuInfoFreshEntity)||{}; _this.queryData.StuInfoFreshFamilyEntities = _this.COPY(res.StuInfoFreshFamilyList); @@ -150,8 +157,14 @@ export default { _this.queryData.ID = res.StuInfoFreshEntity.ID; _this.queryData.Photo = res.StuInfoFreshEntity.Photo; - _this.photo = res.StuInfoFreshEntity.Photo?[{url:res.StuInfoFreshEntity.Url,id:res.StuInfoFreshEntity.Photo}]:[]; - _this.fileList = res.StuInfoFreshEntity.FilesList||[] + let resFile = await this.FETCH_FILEINFO(res.StuInfoFreshEntity.Photo) + let url = "" + if(resFile.F_FolderId){ + url = this.API + '/learun/adms/annexes/wxdown?' + this.URL_QUERY(resFile.F_FolderId, true) + } + // id:res.StuInfoFreshEntity.Photo + _this.photo = (res.StuInfoFreshEntity.Photo&&url)?[{url,id:res.StuInfoFreshEntity.Photo}]:[]; + // _this.fileList = res.StuInfoFreshEntity.FilesList||[] _this.refreshComponent() _this.queryData.telephone = res.StuInfoFreshEntity.telephone; _this.queryData.FamilyAddress = res.StuInfoFreshEntity.FamilyAddress; @@ -160,6 +173,12 @@ export default { }); }, async submit() { + let validateRes = this.validate() + if(validateRes.length>0){ + this.CONFIRM('表单验证失败', validateRes.join('\n')) + return + } + this.LOADING('正在提交数据…'); let res = await this.$refs["upload"].uploadImage() if(res&&res.length){ @@ -170,8 +189,11 @@ export default { this.HTTP_GET('StuInfoFresh/saveStuInfoFresh', this.queryData).then(res => { this.HIDE_LOADING(); if (res) { - this.NAV_TO("/pages/my/newpassword") - this.TOAST('保存成功'); + // this.NAV_TO("/pages/my/newpassword") + setTimeout(()=>{ + this.TOAST('保存成功'); + },100) + this.NAV_BACK() } }); }, @@ -183,7 +205,24 @@ export default { del(str, num) { this.queryData[str].splice(num, 1) }, - + validate(){ + let array = [] + if(!this.photo.length)array.push("[采集照片信息]:不能为空") + // if(!this.queryData.RegionNo)array.push("[籍贯]:不能为空") + // if(!this.queryData.FamilyAddress)array.push("[家庭住址]:不能为空") + if(!this.queryData.telephone)array.push("[联系电话]:不能为空") + if(!this.queryData.StuInfoFreshFamilyEntities.length|| + !this.queryData.StuInfoFreshFamilyEntities.every((item)=>{ + return item.Name&&(item.Relation||item.Relation===0)&&(item.Sex||item.Sex===0)&&(item.Age||item.Age===0)&&(item.Politicy||item.Politicy===0) + }) + )array.push("[家庭成员]:未完善") + // if(!this.queryData.StuInfoFreshEmergePeopleEntities.length|| + // !this.queryData.StuInfoFreshEmergePeopleEntities.every((item)=>{ + // return item.Name&&(item.Relation||item.Relation===0)&&item.Telephone&&item.Mobile&&item.Address + // }) + // )array.push("[紧急联系人]:未完善") + return array + }, refreshComponent(){ // this.uploadVisiable = false this.$nextTick(()=>{ @@ -331,6 +370,13 @@ export default { line-height: 0; } +.passwordDes{ + color: #606266; + font-size: 14px; + padding: 8px; + text-indent:2em; +} + #files { opacity: 0; -webkit-opacity: 0; diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/wxLogin.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/wxLogin.vue index ba76e4da9..6904f9c85 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/wxLogin.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/wxLogin.vue @@ -183,23 +183,24 @@ export default { if(!success){ return } - var logininfo = { - account: this.username, - token: success.baseinfo.token, - date: moment().format('yyyy-MM-dd hh:mm:ss') - }; + // var logininfo = { + // account: this.username, + // token: success.baseinfo.token, + // date: moment().format('yyyy-MM-dd hh:mm:ss') + // }; this.SET_STORAGE("token",success.baseinfo.token) + location.href = "http://" + window.location.host // this.SET_STORAGE('logininfo', logininfo); // this.SET_STORAGE('userinfo', success); - this.username = "" - this.password = "" - if (success.pwd === true) { - this.SET_STORAGE('pwd', true); - this.TOAST("绑定失败!您的密码不满足强度要求,请您先修改密码后再执行系统其他操作"); - } else { - this.SET_STORAGE('pwd', false); - } - location.href = "http://" + window.location.host + "/#/pages/my/newpassword"; + // this.username = "" + // this.password = "" + // if (success.pwd === true) { + // this.SET_STORAGE('pwd', true); + // this.TOAST("绑定失败!您的密码不满足强度要求,请您先修改密码后再执行系统其他操作"); + // } else { + // this.SET_STORAGE('pwd', false); + // } + // location.href = "http://" + window.location.host + "/#/pages/my/newpassword"; }) }, From 7f0661f6b9606df4839cfafff99eea3730ba66a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E7=90=AA?= Date: Thu, 1 Sep 2022 15:16:22 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A1=86=E6=9E=B6bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/learun-app/customlist-sidepage-datefilter.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customlist-sidepage-datefilter.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customlist-sidepage-datefilter.vue index d32ec0eba..86231177d 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customlist-sidepage-datefilter.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customlist-sidepage-datefilter.vue @@ -114,7 +114,7 @@ export default { } else if (type === 'today') { const e = { start: moment() - .subtract(1, 'day') + .subtract(0, 'day') .format('YYYY-MM-DD 00:00:00'), end: todayEnd } @@ -123,7 +123,7 @@ export default { } else if (type === '7d') { const e = { start: moment() - .subtract(7, 'days') + .subtract(6, 'days') .format('YYYY-MM-DD 00:00:00'), end: todayEnd } From a42fcfd93f3b01d1438000e4756a71e2bca8435d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E7=90=AA?= Date: Thu, 1 Sep 2022 17:00:30 +0800 Subject: [PATCH 3/3] =?UTF-8?q?app2.0=E8=80=81=E7=94=9F=E7=BC=B4=E8=B4=B9?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/pages.json | 9 + .../StuInfoBasic_PayFee/PayFee/list.vue | 276 ++++++++++++++++++ .../StuInfoBasic_PayFee/PayFee/single.vue | 82 ++++++ 3 files changed, 367 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuInfoBasic_PayFee/PayFee/list.vue create mode 100644 Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuInfoBasic_PayFee/PayFee/single.vue diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json index ee9553fa7..23f30ddbb 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages.json @@ -1043,6 +1043,15 @@ } } + ,{ + "path" : "pages/EducationalAdministration/StuInfoBasic_PayFee/PayFee/list", + "style" : + { + "navigationBarTitleText": "老生缴费", + "enablePullDownRefresh": false + } + + } ], // 全局样式 diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuInfoBasic_PayFee/PayFee/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuInfoBasic_PayFee/PayFee/list.vue new file mode 100644 index 000000000..bd99b3c6c --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuInfoBasic_PayFee/PayFee/list.vue @@ -0,0 +1,276 @@ + + + + + diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuInfoBasic_PayFee/PayFee/single.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuInfoBasic_PayFee/PayFee/single.vue new file mode 100644 index 000000000..972c5ea0f --- /dev/null +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/StuInfoBasic_PayFee/PayFee/single.vue @@ -0,0 +1,82 @@ + + + + + +