bug 78390
This commit is contained in:
@@ -94,6 +94,7 @@ import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import { getFormDictTreeList } from '@api/api'
|
||||
import CustomComparisonDrawer from './modules/CustomComparisonDrawer'
|
||||
import JTable from '../../../components/jero/JTable'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'CustomComparisonList',
|
||||
@@ -157,12 +158,18 @@ export default {
|
||||
{
|
||||
text: this.$t('edit'),
|
||||
clickEvent: 'handleEdit',
|
||||
has: 'customComparison:edit'
|
||||
has: 'customComparison:edit',
|
||||
show: (record) => {
|
||||
return this.isAdmin || this.userInfo.id === record.authorId
|
||||
}
|
||||
},
|
||||
{ // 删除
|
||||
text: this.$t('delete'),
|
||||
clickEvent: 'handleDelete',
|
||||
has: 'customComparison:delete'
|
||||
has: 'customComparison:delete',
|
||||
show: (record) => {
|
||||
return this.isAdmin || this.userInfo.id === record.authorId
|
||||
}
|
||||
}
|
||||
],
|
||||
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: {
|
||||
initDictConfig () {
|
||||
// 涉及国家
|
||||
@@ -193,7 +209,7 @@ export default {
|
||||
filterTreeOption (input, option) {
|
||||
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
||||
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -608,6 +608,7 @@ export default {
|
||||
this.modal.id = res.result
|
||||
this.getFormData()
|
||||
this.reloadTableData()
|
||||
this.$emit('ok')
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user