From c2fe08d34a0efb0b43b8274cd5a2df8eca114558 Mon Sep 17 00:00:00 2001 From: liangkun Date: Mon, 22 Aug 2022 15:19:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/common/customform.js | 11 ++++++----- .../LearunApp-2.2.0/common/custompage.js | 2 +- .../LearunApp-2.2.0/common/mixins.js | 4 ++-- .../LearunApp-2.2.0/config.js | 6 +++--- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js index 3c1394e52..4a171f0b1 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js @@ -211,7 +211,7 @@ export default { const fileType = fileInfo.F_FileType const fileSize = fileInfo.F_FileSize - const path = this.API + '/annexes/wxdown?' + this.URL_QUERY(uid, true) + const path = this.API + '/learun/adms/annexes/wxdown?' + this.URL_QUERY(uid, true) fileList.push({ path, type: fileType, uid, size: fileSize }) } @@ -274,13 +274,14 @@ export default { case 'upload': const uploadUid = [] - for (const { path, uid } of val) { - if (uid) { - uploadUid.push(uid) + // { path, uid } + for (const item of val) { + if (item.uid) { + uploadUid.push(item.uid) continue } - const fileId = await this.HTTP_UPLOAD(path) + const fileId = await this.HTTP_UPLOAD(item.path||item) if (fileId) { uploadUid.push(fileId) } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js index a580fd751..b48efc4f9 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/custompage.js @@ -256,7 +256,7 @@ export default { const fileType = fileInfo.F_FileType const fileSize = fileInfo.F_FileSize - const path = this.API + '/annexes/wxdown?' + this.URL_QUERY(uid, true) + const path = this.API + '/learun/adms/annexes/wxdown?' + this.URL_QUERY(uid, true) fileList.push({ path, type: fileType, uid, size: fileSize }) } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js index 8fe797283..4bbefbeea 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js @@ -259,7 +259,7 @@ export default { // filePath 为临时文件的路径 // formData 为请求附带的提交数据 async HTTP_UPLOAD(filePath, formData) { - const [err, res] = await this.UPLOAD('/annexes/wxupload', filePath, formData) + const [err, res] = await this.UPLOAD('/learun/adms/annexes/wxupload', filePath, formData) return this.handleResult(err, res) }, @@ -276,7 +276,7 @@ export default { // url 为请求地址 // formData 为请求附带的提交数据 async HTTP_DOWNLOAD(formData) { - const [err, res] = await this.DOWNLOAD('/annexes/wxdown', formData) + const [err, res] = await this.DOWNLOAD('/learun/adms/annexes/wxdown', formData) return this.handleResult(err, res) }, 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 6cd3d9694..c0c228cb7 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -21,10 +21,10 @@ export default { // "http://192.168.2.98:8088/" // ], "apiHost": [ - // "http://localhost:31173/" - "http://192.168.10.85:8088/" + "http://localhost:31173/" + // "http://192.168.10.85:8088/" ], - "webHost":"http://192.168.10.85:8087/", + "webHost":"http://localhost:20472/", // 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 "devAccount": [ // 20201130230 21364200000400266 老师 420528196310072253 学生 420528200606205026 420528200507261428 From d3bc7d3b458b4b428e980355facde56179bdcdc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=99=93=E7=90=AA?= Date: Mon, 22 Aug 2022 15:29:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?app2.2.0=20=E6=88=91=E7=9A=84=E5=AE=A1?= =?UTF-8?q?=E6=89=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/common/customform.js | 12 +- .../LearunApp-2.2.0/common/mixins.js | 7 +- .../components/learun-app/customform.vue | 7 +- .../components/upload-file.vue | 535 +++++++++--------- .../pages/nworkflow/myflow/single.vue | 3 +- .../pages/nworkflow/releasetask/single.vue | 5 +- .../pages/nworkflow/workflow.js | 5 +- .../LearunApp-2.2.0/pages/timeTable/list.vue | 4 +- 8 files changed, 295 insertions(+), 283 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js index 3c1394e52..bde9e0c04 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/customform.js @@ -274,13 +274,15 @@ export default { case 'upload': const uploadUid = [] - for (const { path, uid } of val) { - if (uid) { - uploadUid.push(uid) + console.log(val,'val上传前') + + for (const item of val) { + if (item.uid) { + uploadUid.push(item.uid) continue } - - const fileId = await this.HTTP_UPLOAD(path) + + const fileId = await this.HTTP_UPLOAD(item.path||item) if (fileId) { uploadUid.push(fileId) } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js index 8fe797283..1efbf2cfe 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/mixins.js @@ -259,7 +259,8 @@ export default { // filePath 为临时文件的路径 // formData 为请求附带的提交数据 async HTTP_UPLOAD(filePath, formData) { - const [err, res] = await this.UPLOAD('/annexes/wxupload', filePath, formData) + + const [err, res] = await this.UPLOAD('/learun/adms/annexes/wxupload', filePath, formData) return this.handleResult(err, res) }, @@ -341,7 +342,7 @@ export default { // }) // }) // #endif - + console.log(filePath,'filePath上传内') // #ifndef MP-DINGTALK return uni.uploadFile({ url: uploadUrl, @@ -351,9 +352,11 @@ export default { formData: query }).then(([err, result]) => { if (!err) { + result.data = JSON.parse(result.data) return [null, result] } else { + return [err, null] } diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customform.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customform.vue index 9ff9a6f73..3dafa1ce7 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customform.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/components/learun-app/customform.vue @@ -194,12 +194,14 @@ export default { // 依次验证表单项,返回一个所有错误提示的数组,如果为空数组则表示无错误 verifyValue() { const errorList = [] - + console.log(this.scheme) this.scheme .filter(t => t.verify) .forEach(schemeItem => { if (schemeItem.table && schemeItem.field) { + console.log(schemeItem.verify,'hemeItem.verify') const verifyFunc = this.verify[schemeItem.verify] + console.log(schemeItem.verify) const verifyResult = verifyFunc(this.getValue(schemeItem.__valuePath__)) if (verifyResult !== true) { errorList.push(`[${schemeItem.title}]: ${verifyResult}`) @@ -304,7 +306,8 @@ export default { MobileOrPhoneOrNull: t => t.length <= 0 || /^1[0-9]{10}$/.test(t) || /^[+0-9- ]*$/.test(t) || '须留空或符合手机/电话号码格式', Uri: t => /^[a-zA-z]+:\/\/[^\s]*$/.test(t) || '须符合网址Url格式', - UriOrNull: t => t.length <= 0 || /^[a-zA-z]+:\/\/[^\s]*$/.test(t) || '须留空或符合网址Url格式' + UriOrNull: t => t.length <= 0 || /^[a-zA-z]+:\/\/[^\s]*$/.test(t) || '须留空或符合网址Url格式', + PositiveFloatint:t=> /^([1-9]\d*|(0|[1-9]\d*)\.\d*[1-9])$/.test(t) || '请输入正确的整数或小数(不能为零和负数)' } } } 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 6927690a6..f3947f199 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 @@ -1,296 +1,293 @@