1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 12:01:57 +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') { } else if (action === 'shareLink') {
this.setShareLink() this.setShareLink()
} else if (action.action === 'recordAccess') { } else if (action.action === 'recordAccess') {
this.$store.commit('changeShowRigthPanel', true) this.$store.commit('changeShowRigthPanel', false)
this.$store.commit('setRecordAccess', true) this.$store.commit('setRecordAccess', true)
this.$router.push({
name: this.$route.name,
query: {
...this.$route.query,
typeAction: action.action
}
}, () => {})
} else { } else {
this.runAction(action) this.runAction(action)
} }

View File

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

View File

@ -28,7 +28,7 @@
<div <div
class="handle-button" class="handle-button"
:style="{'top':buttonTop+'px','background-color':theme}" :style="{'top':buttonTop+'px','background-color':theme}"
@click="isShowRightPanel=!isShowRightPanel" @click="closePanel"
> >
<i :class="icon" style="color: white;" /> <i :class="icon" style="color: white;" />
</div> </div>
@ -108,6 +108,17 @@ export default {
window.removeEventListener('click', this.closeSidebar) 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() { insertToBody() {
const elx = this.$refs.rightMenu const elx = this.$refs.rightMenu
const body = document.querySelector('body') 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' import { requestListDocumentActions, requestListDocumentStatuses } from '@/api/ADempiere/window'
// Store used for set all related to context menu // Store used for set all related to context menu
@ -50,8 +50,11 @@ const contextMenu = {
addlistDocumentStatus(state, payload) { addlistDocumentStatus(state, payload) {
state.listDocumentStatus = payload state.listDocumentStatus = payload
}, },
changeShowRigthPanel(state) { changeShowRigthPanel(state, params) {
state.isShowRightPanel = !state.isShowRightPanel if (isEmptyValue(params)) {
state.isShowRightPanel = !state.isShowRightPanel
}
state.isShowRightPanel = params
}, },
changeShowPopoverField(state) { changeShowPopoverField(state) {
state.isShowPopoverField = !state.isShowPopoverField state.isShowPopoverField = !state.isShowPopoverField

View File

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