bug 78390
This commit is contained in:
@@ -94,6 +94,7 @@ import { JeroListMixin } from '@/mixins/JeroListMixin'
|
|||||||
import { getFormDictTreeList } from '@api/api'
|
import { getFormDictTreeList } from '@api/api'
|
||||||
import CustomComparisonDrawer from './modules/CustomComparisonDrawer'
|
import CustomComparisonDrawer from './modules/CustomComparisonDrawer'
|
||||||
import JTable from '../../../components/jero/JTable'
|
import JTable from '../../../components/jero/JTable'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CustomComparisonList',
|
name: 'CustomComparisonList',
|
||||||
@@ -157,12 +158,18 @@ export default {
|
|||||||
{
|
{
|
||||||
text: this.$t('edit'),
|
text: this.$t('edit'),
|
||||||
clickEvent: 'handleEdit',
|
clickEvent: 'handleEdit',
|
||||||
has: 'customComparison:edit'
|
has: 'customComparison:edit',
|
||||||
|
show: (record) => {
|
||||||
|
return this.isAdmin || this.userInfo.id === record.authorId
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{ // 删除
|
{ // 删除
|
||||||
text: this.$t('delete'),
|
text: this.$t('delete'),
|
||||||
clickEvent: 'handleDelete',
|
clickEvent: 'handleDelete',
|
||||||
has: 'customComparison:delete'
|
has: 'customComparison:delete',
|
||||||
|
show: (record) => {
|
||||||
|
return this.isAdmin || this.userInfo.id === record.authorId
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
url: {
|
url: {
|
||||||
@@ -171,6 +178,15 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(['userInfo']),
|
||||||
|
// 当前用户是否管理员
|
||||||
|
isAdmin () {
|
||||||
|
const adminRoleList = window._CONFIG.adminRoleCode.split(',')
|
||||||
|
const userRoleList = this.userInfo.roleCode.split(',')
|
||||||
|
return userRoleList.some(tt => adminRoleList.includes(tt))
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initDictConfig () {
|
initDictConfig () {
|
||||||
// 涉及国家
|
// 涉及国家
|
||||||
@@ -193,7 +209,7 @@ export default {
|
|||||||
filterTreeOption (input, option) {
|
filterTreeOption (input, option) {
|
||||||
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
||||||
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -608,6 +608,7 @@ export default {
|
|||||||
this.modal.id = res.result
|
this.modal.id = res.result
|
||||||
this.getFormData()
|
this.getFormData()
|
||||||
this.reloadTableData()
|
this.reloadTableData()
|
||||||
|
this.$emit('ok')
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user