mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 14:41:29 +00:00
refactor:优化后台规则管理细节
This commit is contained in:
parent
da3e29700c
commit
c30e5e9bfe
@ -14,7 +14,7 @@
|
||||
<Table ref="tableRef" :pagination="false" />
|
||||
|
||||
<!-- 表单 -->
|
||||
<PopupForm ref="formRef" />
|
||||
<PopupForm ref="formRef" :key="baTable.table.extend!.popupFormKey" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -30,6 +30,7 @@ import { useI18n } from 'vue-i18n'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import { getArrayKey } from '/@/utils/common'
|
||||
import { useAdminInfo } from '/@/stores/adminInfo'
|
||||
import { uuid } from '/@/utils/random'
|
||||
|
||||
defineOptions({
|
||||
name: 'auth/group',
|
||||
@ -61,6 +62,9 @@ const baTable: baTableClass = new baTableClass(
|
||||
{ label: t('Create time'), prop: 'create_time', align: 'center', width: '160', render: 'datetime' },
|
||||
{ label: t('Operate'), align: 'center', width: '130', render: 'buttons', buttons: defaultOptButtons(['edit', 'delete']) },
|
||||
],
|
||||
extend: {
|
||||
popupFormKey: uuid(),
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultItems: {
|
||||
@ -119,6 +123,9 @@ const baTable: baTableClass = new baTableClass(
|
||||
onTableDblclick: ({ row }) => {
|
||||
return baTable.table.extend!['adminGroup'].indexOf(row.id) === -1
|
||||
},
|
||||
toggleForm() {
|
||||
baTable.table.extend!.popupFormKey = uuid()
|
||||
},
|
||||
},
|
||||
{
|
||||
getIndex: ({ res }) => {
|
||||
|
@ -57,6 +57,7 @@
|
||||
node-key="id"
|
||||
:props="{ children: 'children', label: 'title', class: treeNodeClass }"
|
||||
:data="state.menuRules"
|
||||
class="w100"
|
||||
/>
|
||||
</el-form-item>
|
||||
<FormItem
|
||||
|
@ -13,7 +13,7 @@
|
||||
<Table ref="tableRef" />
|
||||
|
||||
<!-- 表单 -->
|
||||
<PopupForm ref="formRef" />
|
||||
<PopupForm ref="formRef" :key="baTable.table.extend!.popupFormKey" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -27,6 +27,7 @@ import { defaultOptButtons } from '/@/components/table'
|
||||
import { baTableApi } from '/@/api/common'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import { uuid } from '/@/utils/random'
|
||||
|
||||
defineOptions({
|
||||
name: 'user/group',
|
||||
@ -62,6 +63,9 @@ const baTable = new baTableClass(
|
||||
},
|
||||
],
|
||||
dblClickNotEditColumn: [undefined],
|
||||
extend: {
|
||||
popupFormKey: uuid(),
|
||||
},
|
||||
},
|
||||
{
|
||||
defaultItems: {
|
||||
@ -115,6 +119,9 @@ const baTable = new baTableClass(
|
||||
}
|
||||
return false
|
||||
},
|
||||
toggleForm() {
|
||||
baTable.table.extend!.popupFormKey = uuid()
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -45,6 +45,7 @@
|
||||
node-key="id"
|
||||
:props="{ children: 'children', label: 'title', class: treeNodeClass }"
|
||||
:data="state.menuRules"
|
||||
class="w100"
|
||||
/>
|
||||
</el-form-item>
|
||||
<FormItem
|
||||
|
Loading…
Reference in New Issue
Block a user