From 170d6e95913093237dd011229ca1fdc449aefefe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Wed, 21 Jun 2023 15:54:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=8B=E6=9C=BA=E7=AB=AF?= =?UTF-8?q?=E5=BE=85=E5=8A=9E=E4=B8=AD=E5=BF=83=E4=B8=8D=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E9=A1=B5=E7=AD=BE=EF=BC=8C=E6=9F=A5=E8=AF=A2=E7=9A=84=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E9=83=BD=E4=B8=8D=E8=A2=AB=E6=B8=85=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/permission.js | 2 +- jero-web/src/views/phoneView/handlingPage.vue | 11 +-- .../src/views/phoneView/preHomoMangement.vue | 13 +++- .../src/views/phoneView/processManagement.vue | 5 +- jero-web/src/views/phoneView/toDoCenter.vue | 38 +++++++--- .../views/user/third/JeroThirdLoginMixin.js | 70 +++++++++++++------ 6 files changed, 102 insertions(+), 37 deletions(-) diff --git a/jero-web/src/permission.js b/jero-web/src/permission.js index 9c15d3171..75510d21d 100644 --- a/jero-web/src/permission.js +++ b/jero-web/src/permission.js @@ -119,7 +119,7 @@ router.beforeEach((to, from, next) => { router.addRoutes(store.getters.addRouters) let redirect = decodeURIComponent(from.query.redirect || to.path) if (mobile) { - if (redirect == '/'){ + if (redirect == '/' || redirect == '/dashboard/analysis'){ redirect = '/phoneSearch' } } diff --git a/jero-web/src/views/phoneView/handlingPage.vue b/jero-web/src/views/phoneView/handlingPage.vue index 36423dc24..57e39178a 100644 --- a/jero-web/src/views/phoneView/handlingPage.vue +++ b/jero-web/src/views/phoneView/handlingPage.vue @@ -51,7 +51,7 @@ pageSize: 10, loading: false, finished: false, - isDisplay:false, + isDisplay: false } }, mounted() { @@ -65,7 +65,10 @@ path: this.$route.query.goRouter, query: { searchValue: this.$route.query.searchValue, - activeTab: this.$route.query.activeTab + activeTab: this.$route.query.activeTab, + searchFlowType: this.$route.query.searchFlowType, + checked: this.$route.query.checked, + selectModel: this.$route.query.selectModel } }) } else { @@ -77,9 +80,9 @@ path: '/phonePreHomoMangement', query: { taskDefinitionKey: this.$route.query.taskDefinitionKey, - projectName:this.$route.query.projectName, + projectName: this.$route.query.projectName, id: item.id, - isDisplay:this.isDisplay + isDisplay: this.isDisplay } }) }, diff --git a/jero-web/src/views/phoneView/preHomoMangement.vue b/jero-web/src/views/phoneView/preHomoMangement.vue index d477cd5c6..5761136e7 100644 --- a/jero-web/src/views/phoneView/preHomoMangement.vue +++ b/jero-web/src/views/phoneView/preHomoMangement.vue @@ -317,6 +317,7 @@ } }) }, + getDeliveryResult(item) { getAction('sys/common/getFileInfos', { id: item }).then((res) => { if (res.success) { @@ -333,6 +334,7 @@ } }) }, + disposeResultChange(value) { if (value == 'rzgcssc_tg') { this.form.reasonForReturn = '' @@ -349,6 +351,7 @@ this.form = { ...this.form } }) }, + onSubmit() { this.$refs.form.validate().then(() => { this.textLoading = this.$t('Submitting') @@ -419,7 +422,15 @@ //保存 preservationClick() { let content = [] - content[0] = Object.assign(this.queryForm, this.form) + let fileListId = [] + let form = JSON.parse(JSON.stringify(this.form)) + if (this.queryForm.valueType == 'file') { + this.fileList.forEach(res => { + fileListId.push(res.id) + }) + form.deliveryResult = fileListId.join(',') + } + content[0] = Object.assign(this.queryForm, form) postAction(this.url.saveBatch, { 'dataList': content }).then((res) => { if (res.success) { this.ApprovedClick() diff --git a/jero-web/src/views/phoneView/processManagement.vue b/jero-web/src/views/phoneView/processManagement.vue index 68d8fabae..4e27f164a 100644 --- a/jero-web/src/views/phoneView/processManagement.vue +++ b/jero-web/src/views/phoneView/processManagement.vue @@ -270,7 +270,10 @@ path: this.$route.query.goRouter, query: { searchValue: this.$route.query.searchValue, - activeTab: this.$route.query.activeTab + activeTab: this.$route.query.activeTab, + searchFlowType:this.$route.query.searchFlowType, + checked:this.$route.query.checked, + selectModel:this.$route.query.selectModel, } }) } else { diff --git a/jero-web/src/views/phoneView/toDoCenter.vue b/jero-web/src/views/phoneView/toDoCenter.vue index ff0bdbc17..316b9a106 100644 --- a/jero-web/src/views/phoneView/toDoCenter.vue +++ b/jero-web/src/views/phoneView/toDoCenter.vue @@ -279,16 +279,21 @@ mounted() { document.title = 'NIO GRP' if (this.$route.query.flowType) { + let flowType = this.$route.query.flowType + flowType = flowType.split(',') this.form.flowType = [] - this.form.flowType.push(this.$route.query.flowType) - this.form = { ...this.form } + this.form.flowType = this.form.flowType.concat(flowType) } - if (this.$route.query.searchValue){ - this.phoneQueryValue = this.$route.query.searchValue + if (this.$route.query.searchValue) { + this.phoneQueryValue = this.$route.query.searchValue } if (this.$route.query.activeTab) { this.activeTab = this.$route.query.activeTab + this.form.flowType = this.$route.query.searchFlowType + this.form.checked = JSON.parse(this.$route.query.checked) + this.form.selectModel = this.$route.query.selectModel } + this.form = { ...this.form } // this.toDoProcessPageNo = 1 // this.getToDoProcess() }, @@ -476,8 +481,11 @@ DueDate: 'designDueDate', remarks: 'designRemark', goRouter: '/phoneToDoCenter', - searchValue:this.phoneQueryValue, - activeTab:this.activeTab + searchValue: this.phoneQueryValue, + activeTab: this.activeTab, + checked: this.form.checked, + selectModel: this.form.selectModel, + searchFlowType: this.form.flowType } this.$router.push({ path: '/phoneProcessManagement', @@ -499,8 +507,11 @@ DueDate: 'verifyDueDate', remarks: 'verifyRemark', goRouter: '/phoneToDoCenter', - searchValue:this.phoneQueryValue, - activeTab:this.activeTab + searchValue: this.phoneQueryValue, + activeTab: this.activeTab, + searchFlowType: this.form.flowType, + checked: this.form.checked, + selectModel: this.form.selectModel } this.$router.push({ path: '/phoneProcessManagement', @@ -518,8 +529,11 @@ isDisplay: isTrue, projectName: row.projectName, goRouter: '/phoneToDoCenter', - searchValue:this.phoneQueryValue, - activeTab:this.activeTab + searchValue: this.phoneQueryValue, + activeTab: this.activeTab, + searchFlowType: this.form.flowType, + checked: this.form.checked, + selectModel: this.form.selectModel } }) } else { @@ -597,6 +611,7 @@ } }) }, + getProcessDone() { let form = JSON.parse(JSON.stringify(this.form)) if (form.flowType && form.flowType instanceof Array) { @@ -623,6 +638,7 @@ } }) }, + getSentProcess() { let form = JSON.parse(JSON.stringify(this.form)) if (form.flowType && form.flowType instanceof Array) { @@ -649,6 +665,7 @@ } }) }, + processClick(type) { if (!this.form.flowType) { this.form.flowType = [] @@ -670,6 +687,7 @@ } this.form = { ...this.form } }, + checkboxGroupColor(type) { if (this.form.flowType && this.form.flowType.length > 0) { for (let i = 0; i < this.form.flowType.length; i++) { diff --git a/jero-web/src/views/user/third/JeroThirdLoginMixin.js b/jero-web/src/views/user/third/JeroThirdLoginMixin.js index ff4f1736b..2b0fc5cd9 100644 --- a/jero-web/src/views/user/third/JeroThirdLoginMixin.js +++ b/jero-web/src/views/user/third/JeroThirdLoginMixin.js @@ -74,9 +74,9 @@ export const JeroThirdLoginMixin = { doThirdLogin(token) { if (this.thirdLoginState === false) { this.thirdLoginState = true - let param={}; - param.thirdType=this.thirdType - param.token=token + let param = {} + param.thirdType = this.thirdType + param.token = token this.ThirdLogin(param).then(res => { if (res.success) { this.loginSuccess() @@ -179,33 +179,63 @@ export const JeroThirdLoginMixin = { } }) }, - loginSuccess () { + // 判断当前设备 + isMobile() { + var userAgentInfo = navigator.userAgent + + var mobileAgents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'] + + var mobile_flag = false + + //根据userAgent判断是否是手机 + for (var v = 0; v < mobileAgents.length; v++) { + if (userAgentInfo.indexOf(mobileAgents[v]) > 0) { + mobile_flag = true + break + } + } + var screen_width = window.screen.width + var screen_height = window.screen.height + + //根据屏幕分辨率判断是否是手机 + if (screen_width < 500 && screen_height < 800) { + mobile_flag = true + } + return mobile_flag + }, + loginSuccess() { // update-begin- author:sunjianlei --- date:20190812 --- for: 登录成功后不解除禁用按钮,防止多次点击 // this.loginBtn = false // update-end- author:sunjianlei --- date:20190812 --- for: 登录成功后不解除禁用按钮,防止多次点击 - this.$router.push({ path: "/dashboard/analysis" }).catch(()=>{ + let fullPath = '' + if (isMobile()) { + fullPath = '/phoneSearch' + } else { + fullPath = '/dashboard/analysis' + } + this.$router.push({ path: fullPath }).catch(() => { console.log('登录跳转首页出错,这个错误从哪里来的') }) this.$notification.success({ message: '欢迎', - description: `${timeFix()},欢迎回来`, - }); + description: `${timeFix()},欢迎回来` + }) }, - cmsFailed(err){ - this.$notification[ 'error' ]({ - message: "登录失败", - description:err, - duration: 4, - }); - }, - requestFailed (err) { - this.$notification[ 'error' ]({ + cmsFailed(err) { + this.$notification['error']({ message: '登录失败', - description: ((err.response || {}).data || {}).message || err.message || "请求出现错误,请稍后再试", - duration: 4, - }); - this.loginBtn = false; + description: err, + duration: 4 + }) }, + requestFailed(err) { + this.$notification['error']({ + message: '登录失败', + description: ((err.response || {}).data || {}).message || err.message || '请求出现错误,请稍后再试', + duration: 4 + }) + this.loginBtn = false + } } } \ No newline at end of file