修改禅道已知bug

This commit is contained in:
qq787203167
2022-07-02 12:19:30 +08:00
parent bf68ee69c0
commit 50003ad6f5
2 changed files with 50 additions and 8 deletions
@@ -139,6 +139,7 @@
import axios from 'axios'
import Vue from 'vue'
import VueDraggableResizable from 'vue-draggable-resizable'
import { mapGetters } from 'vuex'
export default {
name: 'index',
@@ -266,6 +267,7 @@
}
},
methods: {
...mapGetters(['userInfo']),
rowClassName(row, index) {
if (row.changeFlag == '1') {
return 'rowClassRedYellow'
@@ -397,8 +399,26 @@
}
getAction(this.url.getLoginUserType, params).then((res) => {
if (res.success) {
this.getTableList(res.result[0].value)
this.$emit('LoginUserType', res.result, this.currentPersonRole)
this.getAndUserId(res.result)
}
})
},
getAndUserId(result) {
let query = {
paramsManifestId: this.$route.query.id,
projectId:this.$route.query.projectId,
userId: this.userInfo().id
}
getAction('/params/userTypeLog/queryCurrentType', query).then((res) => {
if (res.success) {
if (res.result && res.result.userType){
this.getTableList(res.result.userType)
}else{
this.getTableList(result[0].value)
}
this.$emit('LoginUserType', result, this.currentPersonRole,res.result.userType)
} else {
}
})
},
@@ -363,6 +363,7 @@
import axios from 'axios'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import Vue from 'vue'
import { mapGetters } from 'vuex'
export default {
name: 'ParameterItemCollectionList',
@@ -506,14 +507,35 @@
document.title = `${this.paramsManifest.title}-` + this.$t('ParameteItemCollectionList')
},
methods: {
...mapGetters(['userInfo']),
handleCancelRoleSwitching() {
this.visibleRoleSwitching = false
},
handleOkRoleSwitching() {
this.visibleRoleSwitching = false
this.currentPersonRole = this.formInlineRoleSwitching.roleSwitchingCode
localStorage.setItem('currentPersonRole', JSON.stringify(this.formInlineRoleSwitching.roleSwitchingCode))
this.selectedRowKeysValue = []
this.$refs.ruleFormRoleSwitching.validate(valid => {
if (valid) {
let query = {
userType: this.formInlineRoleSwitching.roleSwitchingCode,
paramsManifestId: this.$route.query.id,
projectId: this.$route.query.projectId,
userId: this.userInfo().id
}
this.confirmLoadingRoleSwitching = true
postAction('/params/userTypeLog/edit', query).then((res) => {
if (res.success) {
this.currentPersonRole = this.formInlineRoleSwitching.roleSwitchingCode
this.$message.success(this.$t('OperationSuccessful'))
this.visibleRoleSwitching = false
this.confirmLoadingRoleSwitching = false
localStorage.setItem('currentPersonRole', JSON.stringify(this.formInlineRoleSwitching.roleSwitchingCode))
this.selectedRowKeysValue = []
} else {
this.confirmLoadingRoleSwitching = false
this.$message.warning(this.$t('operationFailed'))
}
})
}
})
},
roleSwitchingClick() {
this.visibleRoleSwitching = true
@@ -792,13 +814,13 @@
}
return flag
},
LoginUserType(val, currentPersonRole) {
LoginUserType(val, currentPersonRole,userType) {
this.RoleType = []
if (this.currentPersonRole == '') {
this.currentPersonRole = val.length >= 1 ? val[0].value : ''
}
this.RoleType = val
this.formInlineRoleSwitching.roleSwitchingCode = currentPersonRole || val[0].value
this.formInlineRoleSwitching.roleSwitchingCode = currentPersonRole || userType || val[0].value
this.formInlineRoleSwitching = { ...this.formInlineRoleSwitching }
},
// 表格所选中得行内容