修改禅道已知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 axios from 'axios'
import Vue from 'vue' import Vue from 'vue'
import VueDraggableResizable from 'vue-draggable-resizable' import VueDraggableResizable from 'vue-draggable-resizable'
import { mapGetters } from 'vuex'
export default { export default {
name: 'index', name: 'index',
@@ -266,6 +267,7 @@
} }
}, },
methods: { methods: {
...mapGetters(['userInfo']),
rowClassName(row, index) { rowClassName(row, index) {
if (row.changeFlag == '1') { if (row.changeFlag == '1') {
return 'rowClassRedYellow' return 'rowClassRedYellow'
@@ -397,8 +399,26 @@
} }
getAction(this.url.getLoginUserType, params).then((res) => { getAction(this.url.getLoginUserType, params).then((res) => {
if (res.success) { if (res.success) {
this.getTableList(res.result[0].value) this.getAndUserId(res.result)
this.$emit('LoginUserType', res.result, this.currentPersonRole) }
})
},
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 axios from 'axios'
import { ACCESS_TOKEN } from '@/store/mutation-types' import { ACCESS_TOKEN } from '@/store/mutation-types'
import Vue from 'vue' import Vue from 'vue'
import { mapGetters } from 'vuex'
export default { export default {
name: 'ParameterItemCollectionList', name: 'ParameterItemCollectionList',
@@ -506,14 +507,35 @@
document.title = `${this.paramsManifest.title}-` + this.$t('ParameteItemCollectionList') document.title = `${this.paramsManifest.title}-` + this.$t('ParameteItemCollectionList')
}, },
methods: { methods: {
...mapGetters(['userInfo']),
handleCancelRoleSwitching() { handleCancelRoleSwitching() {
this.visibleRoleSwitching = false this.visibleRoleSwitching = false
}, },
handleOkRoleSwitching() { handleOkRoleSwitching() {
this.visibleRoleSwitching = false this.$refs.ruleFormRoleSwitching.validate(valid => {
this.currentPersonRole = this.formInlineRoleSwitching.roleSwitchingCode if (valid) {
localStorage.setItem('currentPersonRole', JSON.stringify(this.formInlineRoleSwitching.roleSwitchingCode)) let query = {
this.selectedRowKeysValue = [] 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() { roleSwitchingClick() {
this.visibleRoleSwitching = true this.visibleRoleSwitching = true
@@ -792,13 +814,13 @@
} }
return flag return flag
}, },
LoginUserType(val, currentPersonRole) { LoginUserType(val, currentPersonRole,userType) {
this.RoleType = [] this.RoleType = []
if (this.currentPersonRole == '') { if (this.currentPersonRole == '') {
this.currentPersonRole = val.length >= 1 ? val[0].value : '' this.currentPersonRole = val.length >= 1 ? val[0].value : ''
} }
this.RoleType = val this.RoleType = val
this.formInlineRoleSwitching.roleSwitchingCode = currentPersonRole || val[0].value this.formInlineRoleSwitching.roleSwitchingCode = currentPersonRole || userType || val[0].value
this.formInlineRoleSwitching = { ...this.formInlineRoleSwitching } this.formInlineRoleSwitching = { ...this.formInlineRoleSwitching }
}, },
// 表格所选中得行内容 // 表格所选中得行内容