完善经纪人、茶叶管理
This commit is contained in:
@ -10,21 +10,9 @@
|
||||
</el-button>
|
||||
<el-button @click="handleExpand"> 展开/折叠 </el-button>
|
||||
</div>
|
||||
<el-table
|
||||
ref="tableRef"
|
||||
class="mt-4"
|
||||
size="large"
|
||||
v-loading="pager.loading"
|
||||
:data="pager.lists"
|
||||
row-key="id"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
>
|
||||
<el-table-column
|
||||
label="菜单名称"
|
||||
prop="name"
|
||||
min-width="150"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table ref="tableRef" class="mt-4" size="large" v-loading="pager.loading" :data="pager.lists"
|
||||
row-key="id" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
|
||||
<el-table-column label="菜单名称" prop="name" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column label="类型" prop="type" min-width="80">
|
||||
<template #default="{ row }">
|
||||
<div v-if="row.type == MenuEnum.CATALOGUE">目录</div>
|
||||
@ -39,12 +27,7 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="权限标识"
|
||||
prop="perms"
|
||||
min-width="150"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="权限标识" prop="perms" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column label="状态" prop="is_disable" min-width="100">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.is_disable == 0">正常</el-tag>
|
||||
@ -52,36 +35,17 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="排序" prop="sort" min-width="100" />
|
||||
<el-table-column
|
||||
label="更新时间"
|
||||
prop="update_time"
|
||||
min-width="180"
|
||||
></el-table-column>
|
||||
<el-table-column label="更新时间" prop="update_time" min-width="180"></el-table-column>
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="row.type !== MenuEnum.BUTTON"
|
||||
v-perms="['auth.menu/add']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleAdd(row.id)"
|
||||
>
|
||||
<el-button v-if="row.type !== MenuEnum.BUTTON" v-perms="['auth.menu/add']" type="primary" link
|
||||
@click="handleAdd(row.id)">
|
||||
新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['auth.menu/edit']"
|
||||
type="primary"
|
||||
link
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
<el-button v-perms="['auth.menu/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-perms="['auth.menu/delete']"
|
||||
type="danger"
|
||||
link
|
||||
@click="handleDelete(row.id)"
|
||||
>
|
||||
<el-button v-perms="['auth.menu/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
@ -111,6 +75,7 @@ const { pager, getLists } = usePaging({
|
||||
page_type: 0
|
||||
}
|
||||
})
|
||||
console.log("🚀 ~ pager:", pager)
|
||||
|
||||
const handleAdd = async (id?: number) => {
|
||||
showEdit.value = true
|
||||
|
||||
@ -1,21 +1,8 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup
|
||||
ref="popupRef"
|
||||
title="分配权限"
|
||||
:async="true"
|
||||
width="550px"
|
||||
@confirm="handleSubmit"
|
||||
@close="handleClose"
|
||||
>
|
||||
<el-form
|
||||
class="ls-form"
|
||||
ref="formRef"
|
||||
:rules="rules"
|
||||
:model="formData"
|
||||
label-width="60px"
|
||||
v-loading="loading"
|
||||
>
|
||||
<popup ref="popupRef" title="分配权限" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form class="ls-form" ref="formRef" :rules="rules" :model="formData" label-width="60px"
|
||||
v-loading="loading">
|
||||
<el-scrollbar class="h-[400px] sm:h-[600px]">
|
||||
<el-form-item label="权限" prop="menu_id">
|
||||
<div>
|
||||
@ -23,18 +10,11 @@
|
||||
<el-checkbox label="全选/不全选" @change="handleSelectAll" />
|
||||
<el-checkbox v-model="checkStrictly" label="父子联动" />
|
||||
<div>
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
:data="menuTree"
|
||||
:props="{
|
||||
label: 'name',
|
||||
children: 'children'
|
||||
}"
|
||||
:check-strictly="!checkStrictly"
|
||||
node-key="id"
|
||||
:default-expand-all="isExpand"
|
||||
show-checkbox
|
||||
/>
|
||||
<el-tree ref="treeRef" :data="menuTree" :props="{
|
||||
label: 'name',
|
||||
children: 'children'
|
||||
}" :check-strictly="!checkStrictly" node-key="id" :default-expand-all="isExpand"
|
||||
show-checkbox />
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
Reference in New Issue
Block a user