mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-11-02 20:34:01 +08:00
强化ts类型
This commit is contained in:
@@ -6,6 +6,10 @@ import config from '@/config'
|
|||||||
export function adminLists(params: any) {
|
export function adminLists(params: any) {
|
||||||
return request.get({ url: '/system/admin/list', params })
|
return request.get({ url: '/system/admin/list', params })
|
||||||
}
|
}
|
||||||
|
// 管理员列表
|
||||||
|
export function adminListAll(params: any) {
|
||||||
|
return request.get({ url: '/system/admin/listAll', params })
|
||||||
|
}
|
||||||
// 管理员详情
|
// 管理员详情
|
||||||
export function adminDetail(params: any) {
|
export function adminDetail(params: any) {
|
||||||
return request.get({ url: '/system/admin/detail', params })
|
return request.get({ url: '/system/admin/detail', params })
|
||||||
|
|||||||
@@ -141,9 +141,8 @@ function open(data) {
|
|||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
function changeSteps(item) {
|
function changeSteps(item) {
|
||||||
const fieldList = formDesign.value.getFieldWidgets()
|
fieldList.value = formDesign.value.getFieldWidgets()
|
||||||
|
console.log('fieldList', fieldList.value)
|
||||||
fieldList.value = fieldList
|
|
||||||
|
|
||||||
activeStep.value = item.key
|
activeStep.value = item.key
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="padding-bottom: 10px">
|
<div style="padding-bottom: 10px">
|
||||||
<el-card header="条件编辑">
|
<el-card header="条件编辑">
|
||||||
<el-alert title="同一父级的网关只能有一个通过" type="warning" />
|
<el-alert title="同一父级的网关只能有一个通过" type="warning" :closable="false" />
|
||||||
|
|
||||||
<!-- 设置优先级 -->
|
<div style="padding: 20px 0 20px" class="flex">
|
||||||
<div style="padding: 40px 0 20px">
|
<el-select class="flex-1" v-model="selectGateway" placeholder="请选择">
|
||||||
<el-select v-model="selectGateway" placeholder="请选择">
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in fieldList"
|
v-for="item in fieldList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -24,7 +23,7 @@
|
|||||||
{{ getLabel(row.id) }}
|
{{ getLabel(row.id) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="权限">
|
<el-table-column label="判断方式">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-select v-model="row.condition" placeholder="请选择判断符">
|
<el-select v-model="row.condition" placeholder="请选择判断符">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -53,27 +52,16 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import type { PropType } from 'vue'
|
// import type { PropType } from 'vue'
|
||||||
import { Close } from '@element-plus/icons-vue'
|
import { Close } from '@element-plus/icons-vue'
|
||||||
const props = defineProps({
|
|
||||||
node: {
|
import type { NodeType, PropertiesType, FieldListType } from './property.type'
|
||||||
type: Object,
|
|
||||||
default: () => ({})
|
const props = defineProps<{
|
||||||
},
|
node?: NodeType
|
||||||
fieldList: {
|
fieldList?: FieldListType[]
|
||||||
type: Array as PropType<
|
properties?: PropertiesType
|
||||||
{
|
}>()
|
||||||
id: string
|
|
||||||
label: string
|
|
||||||
}[]
|
|
||||||
>,
|
|
||||||
default: () => []
|
|
||||||
},
|
|
||||||
properties: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const conditionList = [
|
const conditionList = [
|
||||||
{
|
{
|
||||||
value: '==',
|
value: '==',
|
||||||
@@ -100,7 +88,7 @@ const selectGateway = ref('')
|
|||||||
function getLabel(id) {
|
function getLabel(id) {
|
||||||
return props.fieldList.find((item) => {
|
return props.fieldList.find((item) => {
|
||||||
if (item.id === id) {
|
if (item.id === id) {
|
||||||
return item.label
|
return true
|
||||||
}
|
}
|
||||||
})?.label
|
})?.label
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="指定部门" v-if="props.properties.userType == 1">
|
<el-form-item label="指定部门" v-if="props.properties.userType == 1">
|
||||||
<el-select
|
<!-- <el-select
|
||||||
v-model="props.properties.deptId"
|
v-model="props.properties.deptId"
|
||||||
placeholder="请选择审批部门"
|
placeholder="请选择审批部门"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@@ -25,14 +25,18 @@
|
|||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select> -->
|
||||||
|
<el-tree-select
|
||||||
|
v-model="props.properties.deptId"
|
||||||
|
:data="deptList"
|
||||||
|
:check-strictly="true"
|
||||||
|
default-expand-all
|
||||||
|
:render-after-expand="false"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="岗位" v-if="[1].includes(props.properties.userType)">
|
<el-form-item label="岗位" v-if="[1].includes(props.properties.userType)">
|
||||||
<el-select
|
<el-select v-model="props.properties.postId" placeholder="请选择岗位">
|
||||||
v-model="props.properties.postId"
|
|
||||||
placeholder="请选择岗位"
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in postList"
|
v-for="item in postList"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -63,48 +67,44 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { adminLists } from '@/api/perms/admin'
|
import { adminListAll } from '@/api/perms/admin'
|
||||||
import { deptLists } from '@/api/org/department'
|
import { deptAll } from '@/api/org/department'
|
||||||
import { postAll } from '@/api/org/post'
|
import { postAll } from '@/api/org/post'
|
||||||
const props = defineProps({
|
import { arrayToTree } from '@/utils/util'
|
||||||
node: {
|
import type { NodeType, PropertiesType, FieldListType } from './property.type'
|
||||||
type: Object,
|
|
||||||
default: () => ({})
|
const props = defineProps<{
|
||||||
},
|
node?: NodeType
|
||||||
properties: {
|
fieldList?: FieldListType[]
|
||||||
type: Object,
|
properties?: PropertiesType
|
||||||
default: () => ({})
|
}>()
|
||||||
},
|
|
||||||
fieldList: {
|
|
||||||
type: Array,
|
|
||||||
default: () => []
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const adminUserList = ref([])
|
const adminUserList = ref([])
|
||||||
const deptList = ref([])
|
const deptList = ref([])
|
||||||
const postList = ref([])
|
const postList = ref([])
|
||||||
|
|
||||||
function getAdminList() {
|
function getAdminList() {
|
||||||
adminLists().then((res) => {
|
adminListAll({}).then((res) => {
|
||||||
adminUserList.value = res.lists.map((item) => {
|
adminUserList.value = res.map((item) => {
|
||||||
return {
|
return {
|
||||||
value: item.id,
|
value: item.id,
|
||||||
label: item.nickname
|
label: item.nickname + ' (' + item.username + ')'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function getDeptList() {
|
function getDeptList() {
|
||||||
deptLists().then((res) => {
|
deptAll().then((res) => {
|
||||||
deptList.value = res.map((item) => {
|
const list = res.map((item) => {
|
||||||
return {
|
return {
|
||||||
value: item.id,
|
value: item.id,
|
||||||
label: item.name
|
label: item.name,
|
||||||
|
...item
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
deptList.value = arrayToTree(list, '')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function getPostList() {
|
function getPostList() {
|
||||||
|
|||||||
@@ -5,14 +5,7 @@
|
|||||||
:title="'节点:' + node?.text?.value"
|
:title="'节点:' + node?.text?.value"
|
||||||
@close="close"
|
@close="close"
|
||||||
>
|
>
|
||||||
<!-- fieldList:{{ fieldList }}
|
|
||||||
<div>properties:{{ properties }}</div> -->
|
|
||||||
|
|
||||||
<!-- 开始节点 -->
|
|
||||||
<!-- {{ node }} -->
|
|
||||||
|
|
||||||
<div v-if="node.type == 'bpmn:startEvent'">
|
<div v-if="node.type == 'bpmn:startEvent'">
|
||||||
开始节点
|
|
||||||
<FieldAuth :node="node" :properties="properties" :fieldList="fieldList"></FieldAuth>
|
<FieldAuth :node="node" :properties="properties" :fieldList="fieldList"></FieldAuth>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="node.type == 'bpmn:userTask'">
|
<div v-if="node.type == 'bpmn:userTask'">
|
||||||
@@ -21,12 +14,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="node.type == 'bpmn:serviceTask'">
|
<div v-if="node.type == 'bpmn:serviceTask'">
|
||||||
<div>系统任务</div>
|
<div>(都还不支持)系统任务</div>
|
||||||
<div>抄送</div>
|
<div>(都还不支持)抄送</div>
|
||||||
<div>发送邮件</div>
|
<div>(都还不支持)发送邮件</div>
|
||||||
<div>发送短信</div>
|
<div>(都还不支持)发送短信</div>
|
||||||
<div>发送站内消息</div>
|
<div>(都还不支持)发送站内消息</div>
|
||||||
<div>数据入库</div>
|
<div>(都还不支持)数据入库</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="node.type == 'bpmn:exclusiveGateway'">
|
<div v-if="node.type == 'bpmn:exclusiveGateway'">
|
||||||
<Gateway :node="node" :properties="properties" :fieldList="fieldList"></Gateway>
|
<Gateway :node="node" :properties="properties" :fieldList="fieldList"></Gateway>
|
||||||
@@ -36,48 +29,53 @@
|
|||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref, toRaw } from 'vue'
|
||||||
import UserTask from './UserTask.vue'
|
import UserTask from './UserTask.vue'
|
||||||
import FieldAuth from './FieldAuth.vue'
|
import FieldAuth from './FieldAuth.vue'
|
||||||
import Gateway from './Gateway.vue'
|
import Gateway from './Gateway.vue'
|
||||||
|
import type { NodeType, PropertiesType, FormFieldListType, FieldListType } from './property.type'
|
||||||
|
defineOptions({
|
||||||
|
name: 'PropertyPanel'
|
||||||
|
})
|
||||||
const emit = defineEmits(['setProperties'])
|
const emit = defineEmits(['setProperties'])
|
||||||
|
|
||||||
const drawerVisible = ref(false)
|
const drawerVisible = ref(false)
|
||||||
const node = ref<{
|
|
||||||
type?: string
|
const node = ref<NodeType>({})
|
||||||
text?: {
|
const properties = reactive<PropertiesType>({
|
||||||
value?: string
|
userType: null,
|
||||||
}
|
userId: null,
|
||||||
}>({})
|
deptId: null,
|
||||||
const properties = reactive({
|
postId: null,
|
||||||
userType: '',
|
|
||||||
userId: '',
|
|
||||||
deptId: '',
|
|
||||||
postId: '',
|
|
||||||
fieldAuth: {},
|
fieldAuth: {},
|
||||||
gateway: []
|
gateway: []
|
||||||
})
|
})
|
||||||
const fieldList = ref([])
|
|
||||||
|
|
||||||
const open = (newNode, newFieldList) => {
|
const fieldList = ref<FieldListType[]>([])
|
||||||
|
|
||||||
|
const open = (newNode: NodeType, newFieldList: FormFieldListType[]) => {
|
||||||
|
if (newNode.type == 'bpmn:endEvent') {
|
||||||
|
return
|
||||||
|
}
|
||||||
node.value = newNode
|
node.value = newNode
|
||||||
|
|
||||||
properties.userType = newNode?.properties?.userType || ''
|
properties.userType = newNode?.properties?.userType || null
|
||||||
properties.userId = newNode?.properties?.userId || ''
|
properties.userId = newNode?.properties?.userId || null
|
||||||
properties.deptId = newNode?.properties?.deptId || ''
|
properties.deptId = newNode?.properties?.deptId || null
|
||||||
properties.postId = newNode?.properties?.postId || ''
|
properties.postId = newNode?.properties?.postId || null
|
||||||
properties.gateway = newNode?.properties?.gateway || []
|
properties.gateway = newNode?.properties?.gateway || []
|
||||||
|
|
||||||
properties.fieldAuth = newNode?.properties?.fieldAuth
|
properties.fieldAuth = newNode?.properties?.fieldAuth
|
||||||
? { ...newNode?.properties?.fieldAuth }
|
? { ...newNode?.properties?.fieldAuth }
|
||||||
: {}
|
: {}
|
||||||
|
|
||||||
fieldList.value = newFieldList.map((item) => ({
|
fieldList.value = newFieldList.map((item) => {
|
||||||
id: item?.field?.id,
|
return {
|
||||||
label: item?.field?.options?.label,
|
id: item?.field?.id,
|
||||||
auth: newNode?.properties?.fieldAuth?.[item?.field?.id] || 1
|
label: item?.field?.options?.label,
|
||||||
}))
|
auth: newNode?.properties?.fieldAuth?.[item?.field?.id] || 1
|
||||||
|
}
|
||||||
|
})
|
||||||
drawerVisible.value = true
|
drawerVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,8 +84,8 @@ const close = () => {
|
|||||||
fieldList.value.forEach((item) => {
|
fieldList.value.forEach((item) => {
|
||||||
fieldAuth[item.id] = item.auth
|
fieldAuth[item.id] = item.auth
|
||||||
})
|
})
|
||||||
|
properties.fieldAuth = fieldAuth
|
||||||
emit('setProperties', node.value, { ...properties })
|
emit('setProperties', toRaw(node.value), { ...toRaw(properties) })
|
||||||
drawerVisible.value = false
|
drawerVisible.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
export type PropertiesType = {
|
||||||
|
userType?: number
|
||||||
|
userId?: string | number
|
||||||
|
deptId?: string | number
|
||||||
|
postId?: string | number
|
||||||
|
fieldAuth?: {
|
||||||
|
[key: string]: number
|
||||||
|
}
|
||||||
|
gateway?: {
|
||||||
|
id: string
|
||||||
|
value: string
|
||||||
|
condition: string
|
||||||
|
}[]
|
||||||
|
}
|
||||||
|
export type NodeType = {
|
||||||
|
id?: string
|
||||||
|
type?:
|
||||||
|
| 'bpmn:startEvent'
|
||||||
|
| 'bpmn:userTask'
|
||||||
|
| 'bpmn:serviceTask'
|
||||||
|
| 'bpmn:exclusiveGateway'
|
||||||
|
| 'bpmn:endEvent'
|
||||||
|
text?: {
|
||||||
|
value?: string
|
||||||
|
x?: number
|
||||||
|
y?: number
|
||||||
|
}
|
||||||
|
properties?: PropertiesType
|
||||||
|
x?: number
|
||||||
|
y?: number
|
||||||
|
}
|
||||||
|
// Form读取读取德列表结构
|
||||||
|
export type FormFieldListType = {
|
||||||
|
name?: string
|
||||||
|
type?: string
|
||||||
|
field?: {
|
||||||
|
id: string
|
||||||
|
|
||||||
|
options?: {
|
||||||
|
name: string
|
||||||
|
label: string
|
||||||
|
defaultValue: ''
|
||||||
|
}
|
||||||
|
type?: string //'textarea'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export type FieldListType = {
|
||||||
|
id?: string
|
||||||
|
label?: string
|
||||||
|
auth?: number
|
||||||
|
}
|
||||||
@@ -31,7 +31,7 @@ import '@logicflow/core/dist/style/index.css'
|
|||||||
import '@logicflow/extension/lib/style/index.css'
|
import '@logicflow/extension/lib/style/index.css'
|
||||||
import DiagramToolbar from './DiagramToolbar.vue'
|
import DiagramToolbar from './DiagramToolbar.vue'
|
||||||
import DiagramSidebar from './DiagramSidebar.vue'
|
import DiagramSidebar from './DiagramSidebar.vue'
|
||||||
import PropertyPanel from './PropertyPanel/PropertyPanel.vue'
|
import PropertyPanel from './PropertyPanel/index.vue'
|
||||||
import { registerCustomElement } from './node'
|
import { registerCustomElement } from './node'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@@ -106,7 +106,7 @@ function initLogicFlow(data) {
|
|||||||
|
|
||||||
// Event listener for node clicks
|
// Event listener for node clicks
|
||||||
lf.value.on('node:click', (e) => {
|
lf.value.on('node:click', (e) => {
|
||||||
console.log('Click on node', e.data)
|
console.log('Click on node', e.data, props.fieldList)
|
||||||
PropertyPanelRef.value.open(e.data, props.fieldList)
|
PropertyPanelRef.value.open(e.data, props.fieldList)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -121,6 +121,8 @@ function dragInNode(type, text = '') {
|
|||||||
|
|
||||||
// Function to set properties of a node
|
// Function to set properties of a node
|
||||||
function setProperties(node, item) {
|
function setProperties(node, item) {
|
||||||
|
console.log('setProperties', node, item)
|
||||||
|
|
||||||
lf.value.setProperties(node.id, item)
|
lf.value.setProperties(node.id, item)
|
||||||
}
|
}
|
||||||
// function setZIndex(node, type) {
|
// function setZIndex(node, type) {
|
||||||
|
|||||||
@@ -16,8 +16,10 @@
|
|||||||
class="mt-4"
|
class="mt-4"
|
||||||
size="large"
|
size="large"
|
||||||
:data="lists"
|
:data="lists"
|
||||||
|
:lazy="true"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||||
|
height="calc(100vh - 220px)"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="菜单名称"
|
label="菜单名称"
|
||||||
|
|||||||
@@ -104,6 +104,18 @@ func (ah AdminHandler) List(c *gin.Context) {
|
|||||||
response.CheckAndRespWithData(c, res, err)
|
response.CheckAndRespWithData(c, res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ListAll 所有管理员列表
|
||||||
|
func (ah AdminHandler) ListAll(c *gin.Context) {
|
||||||
|
|
||||||
|
var listReq SystemAuthAdminListReq
|
||||||
|
|
||||||
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &listReq)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
res, err := Service.ListAll(listReq)
|
||||||
|
response.CheckAndRespWithData(c, res, err)
|
||||||
|
}
|
||||||
|
|
||||||
// detail 管理员详细
|
// detail 管理员详细
|
||||||
func (ah AdminHandler) Detail(c *gin.Context) {
|
func (ah AdminHandler) Detail(c *gin.Context) {
|
||||||
var detailReq SystemAuthAdminDetailReq
|
var detailReq SystemAuthAdminDetailReq
|
||||||
|
|||||||
@@ -206,6 +206,44 @@ func (adminSrv systemAuthAdminService) List(page request.PageReq, listReq System
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// List 管理员列表
|
||||||
|
func (adminSrv systemAuthAdminService) ListAll(listReq SystemAuthAdminListReq) (res []SystemAuthAdminResp, e error) {
|
||||||
|
// 分页信息
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
adminTbName := core.DBTableName(&system_model.SystemAuthAdmin{})
|
||||||
|
roleTbName := core.DBTableName(&system_model.SystemAuthRole{})
|
||||||
|
deptTbName := core.DBTableName(&system_model.SystemAuthDept{})
|
||||||
|
adminModel := adminSrv.db.Table(adminTbName+" AS admin").Where("admin.is_delete = ?", 0).Joins(
|
||||||
|
fmt.Sprintf("LEFT JOIN %s ON admin.role = %s.id", roleTbName, roleTbName)).Joins(
|
||||||
|
fmt.Sprintf("LEFT JOIN %s ON admin.dept_id = %s.id", deptTbName, deptTbName)).Select(
|
||||||
|
fmt.Sprintf("admin.*, %s.name as dept, %s.name as role", deptTbName, roleTbName))
|
||||||
|
// 条件
|
||||||
|
if listReq.Username != "" {
|
||||||
|
adminModel = adminModel.Where("username like ?", "%"+listReq.Username+"%")
|
||||||
|
}
|
||||||
|
if listReq.Nickname != "" {
|
||||||
|
adminModel = adminModel.Where("nickname like ?", "%"+listReq.Nickname+"%")
|
||||||
|
}
|
||||||
|
if listReq.Role >= 0 {
|
||||||
|
adminModel = adminModel.Where("role = ?", listReq.Role)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数据
|
||||||
|
var adminResp []SystemAuthAdminResp
|
||||||
|
err := adminModel.Order("id desc, sort desc").Find(&adminResp).Error
|
||||||
|
if e = response.CheckErr(err, "列表获取失败"); e != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
for i := 0; i < len(adminResp); i++ {
|
||||||
|
adminResp[i].Avatar = util.UrlUtil.ToAbsoluteUrl(adminResp[i].Avatar)
|
||||||
|
if adminResp[i].ID == 1 {
|
||||||
|
adminResp[i].Role = "系统管理员"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return adminResp, nil
|
||||||
|
}
|
||||||
|
|
||||||
// Detail 管理员详细
|
// Detail 管理员详细
|
||||||
func (adminSrv systemAuthAdminService) Detail(id uint) (res SystemAuthAdminResp, e error) {
|
func (adminSrv systemAuthAdminService) Detail(id uint) (res SystemAuthAdminResp, e error) {
|
||||||
var sysAdmin system_model.SystemAuthAdmin
|
var sysAdmin system_model.SystemAuthAdmin
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ func AdminRoute(rg *gin.RouterGroup) {
|
|||||||
|
|
||||||
rg.GET("/admin/self", handle.Self)
|
rg.GET("/admin/self", handle.Self)
|
||||||
rg.GET("/admin/list", handle.List)
|
rg.GET("/admin/list", handle.List)
|
||||||
|
rg.GET("/admin/listAll", handle.ListAll)
|
||||||
rg.GET("/admin/ListByDeptId", handle.ListByDeptId)
|
rg.GET("/admin/ListByDeptId", handle.ListByDeptId)
|
||||||
rg.GET("/admin/detail", handle.Detail)
|
rg.GET("/admin/detail", handle.Detail)
|
||||||
rg.POST("/admin/add", middleware.RecordLog("管理员新增"), handle.Add)
|
rg.POST("/admin/add", middleware.RecordLog("管理员新增"), handle.Add)
|
||||||
|
|||||||
Reference in New Issue
Block a user