修改手机端待办中心不切换页签,查询的条件都不被清空

This commit is contained in:
范强强
2023-06-21 15:54:17 +08:00
parent 0207efb607
commit 170d6e9591
6 changed files with 102 additions and 37 deletions
+1 -1
View File
@@ -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'
}
}
@@ -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
}
})
},
@@ -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()
@@ -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 {
+28 -10
View File
@@ -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++) {
@@ -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
}
}
}