1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-07 18:25:45 +08:00

Fix Record Access (#832)

* Fix Record Access

* correct observation

Co-authored-by: elsiosanchez <elsiossanches@gmail.com>
This commit is contained in:
Elsio Sanchez 2021-05-11 17:42:12 -04:00 committed by GitHub
parent 03eb8949c6
commit fed1cec1a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 30 additions and 9 deletions

View File

@ -243,8 +243,15 @@ export default {
} else if (action === 'shareLink') {
this.setShareLink()
} else if (action.action === 'recordAccess') {
this.$store.commit('changeShowRigthPanel', true)
this.$store.commit('changeShowRigthPanel', false)
this.$store.commit('setRecordAccess', true)
this.$router.push({
name: this.$route.name,
query: {
...this.$route.query,
typeAction: action.action
}
}, () => {})
} else {
this.runAction(action)
}

View File

@ -349,10 +349,6 @@ export default {
}
},
SendRecorAccess(list) {
// list.forEach(element => {
// element.isReadOnly = this.isReadonly
// element.isDependentEntities = this.isDependentEntities
// })
this.saveRecordAccess(list)
}
}

View File

@ -28,7 +28,7 @@
<div
class="handle-button"
:style="{'top':buttonTop+'px','background-color':theme}"
@click="isShowRightPanel=!isShowRightPanel"
@click="closePanel"
>
<i :class="icon" style="color: white;" />
</div>
@ -108,6 +108,17 @@ export default {
window.removeEventListener('click', this.closeSidebar)
}
},
closePanel() {
this.$router.push({
name: this.$route.name,
query: {
...this.$route.query,
typeAction: ''
}
}, () => {})
this.$store.commit('changeShowRigthPanel', false)
this.isShowRightPanel = !this.isShowRightPanel
},
insertToBody() {
const elx = this.$refs.rightMenu
const body = document.querySelector('body')

View File

@ -1,4 +1,4 @@
import { recursiveTreeSearch } from '@/utils/ADempiere/valueUtils.js'
import { isEmptyValue, recursiveTreeSearch } from '@/utils/ADempiere/valueUtils.js'
import { requestListDocumentActions, requestListDocumentStatuses } from '@/api/ADempiere/window'
// Store used for set all related to context menu
@ -50,8 +50,11 @@ const contextMenu = {
addlistDocumentStatus(state, payload) {
state.listDocumentStatus = payload
},
changeShowRigthPanel(state) {
state.isShowRightPanel = !state.isShowRightPanel
changeShowRigthPanel(state, params) {
if (isEmptyValue(params)) {
state.isShowRightPanel = !state.isShowRightPanel
}
state.isShowRightPanel = params
},
changeShowPopoverField(state) {
state.isShowPopoverField = !state.isShowPopoverField

View File

@ -117,6 +117,10 @@ export default {
return component
},
showRecordAccess() {
if (this.$route.query.typeAction === 'recordAccess') {
this.$store.commit('changeShowRigthPanel', true)
return true
}
return this.$store.getters.getShowRecordAccess
},
isNewRecord() {