mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-20 20:39:55 +00:00
feat(系统参数): 新增系统参数管理模块
refactor(前端): 统一按钮权限属性顺序 style(前端): 格式化代码缩进和换行
This commit is contained in:
@@ -838,9 +838,9 @@
|
|||||||
"icon": "setting",
|
"icon": "setting",
|
||||||
"order": 8,
|
"order": 8,
|
||||||
"permission": "system:param:query",
|
"permission": "system:param:query",
|
||||||
"route_name": "Config",
|
"route_name": "Params",
|
||||||
"route_path": "/system/config",
|
"route_path": "/system/param",
|
||||||
"component_path": "system/config/index",
|
"component_path": "system/param/index",
|
||||||
"status": true,
|
"status": true,
|
||||||
"keep_alive": true,
|
"keep_alive": true,
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
|
|||||||
@@ -16,23 +16,8 @@
|
|||||||
</el-icon>
|
</el-icon>
|
||||||
<span class="status-text">{{ connectionStatusText }}</span>
|
<span class="status-text">{{ connectionStatusText }}</span>
|
||||||
</div>
|
</div>
|
||||||
<el-button
|
<el-button v-if="messages.length > 0" v-hasPerm="['ai:mcp:clear']" text :icon="Delete" @click="clearCurrentChat">清空对话</el-button>
|
||||||
v-if="messages.length > 0"
|
<el-button v-hasPerm="['ai:mcp:connection']" text :icon="Setting" @click="toggleConnection">{{ isConnected ? '断开连接' : '重新连接' }}</el-button>
|
||||||
text
|
|
||||||
@click="clearCurrentChat"
|
|
||||||
v-hasPerm="['ai:mcp:clear']"
|
|
||||||
>
|
|
||||||
<el-icon><Delete /></el-icon>
|
|
||||||
清空对话
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
text
|
|
||||||
@click="toggleConnection"
|
|
||||||
v-hasPerm="['ai:mcp:connection']"
|
|
||||||
>
|
|
||||||
<el-icon><Setting /></el-icon>
|
|
||||||
{{ isConnected ? '断开连接' : '重新连接' }}
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -100,12 +85,8 @@
|
|||||||
<div v-else class="message-text" v-html="formatMessage(message.content)"></div>
|
<div v-else class="message-text" v-html="formatMessage(message.content)"></div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!message.loading" class="message-actions">
|
<div v-if="!message.loading" class="message-actions">
|
||||||
<el-button text size="small" @click="copyMessage(message.content)">
|
<el-button text size="small" :icon="CopyDocument" @click="copyMessage(message.content)"></el-button>
|
||||||
<el-icon><CopyDocument /></el-icon>
|
<el-button v-if="message.type === 'assistant'" text size="small" :icon="RefreshLeft"></el-button>
|
||||||
</el-button>
|
|
||||||
<el-button v-if="message.type === 'assistant'" text size="small">
|
|
||||||
<el-icon><RefreshLeft /></el-icon>
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -324,7 +305,7 @@ const sendMessage = async () => {
|
|||||||
// 发送消息到 WebSocket
|
// 发送消息到 WebSocket
|
||||||
if (ws?.readyState === WebSocket.OPEN) {
|
if (ws?.readyState === WebSocket.OPEN) {
|
||||||
const payload = {
|
const payload = {
|
||||||
message: message,
|
message,
|
||||||
timestamp: Date.now()
|
timestamp: Date.now()
|
||||||
}
|
}
|
||||||
ws.send(JSON.stringify(payload))
|
ws.send(JSON.stringify(payload))
|
||||||
@@ -405,26 +386,6 @@ const scrollToBottom = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 格式化时间
|
|
||||||
const formatTime = (timestamp: number) => {
|
|
||||||
const date = new Date(timestamp)
|
|
||||||
const now = new Date()
|
|
||||||
|
|
||||||
if (date.toDateString() === now.toDateString()) {
|
|
||||||
return date.toLocaleTimeString('zh-CN', {
|
|
||||||
hour: '2-digit',
|
|
||||||
minute: '2-digit'
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
return date.toLocaleString('zh-CN', {
|
|
||||||
month: '2-digit',
|
|
||||||
day: '2-digit',
|
|
||||||
hour: '2-digit',
|
|
||||||
minute: '2-digit'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 格式化消息内容
|
// 格式化消息内容
|
||||||
const formatMessage = (content: string) => {
|
const formatMessage = (content: string) => {
|
||||||
if (!content) return ''
|
if (!content) return ''
|
||||||
|
|||||||
@@ -570,15 +570,8 @@
|
|||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
||||||
<el-button @click="handleCloseDialog">取消</el-button>
|
<el-button @click="handleCloseDialog">取消</el-button>
|
||||||
<el-button
|
<el-button v-if="dialogVisible.type !== 'detail'" type="primary" @click="handleSubmit">确定</el-button>
|
||||||
v-if="dialogVisible.type !== 'detail'"
|
<el-button v-else v-hasPerm="['app:job:detail']" type="primary" @click="handleCloseDialog" >确定</el-button>
|
||||||
type="primary"
|
|
||||||
@click="handleSubmit"
|
|
||||||
>确定</el-button
|
|
||||||
>
|
|
||||||
<el-button v-else type="primary" @click="handleCloseDialog" v-hasPerm="['app:job:detail']"
|
|
||||||
>确定</el-button
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
|
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="uploadRef"
|
ref="uploadRef"
|
||||||
class="el-upload"
|
|
||||||
v-model:file-list="fileList"
|
v-model:file-list="fileList"
|
||||||
|
class="el-upload"
|
||||||
name="file"
|
name="file"
|
||||||
:show-file-list="false"
|
:show-file-list="false"
|
||||||
:before-upload="handleBeforeUpload"
|
:before-upload="handleBeforeUpload"
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
@change="handleFileChange"
|
@change="handleFileChange"
|
||||||
>
|
>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button type="primary" :icon="Camera" class="upload-trigger" v-hasPerm="['system:user:update']"/>
|
<el-button v-hasPerm="['system:user:update']" type="primary" :icon="Camera" class="upload-trigger"/>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" :loading="infoSubmitting" icon="edit" @click="handleSave" v-hasPerm="['system:user:update']">保存更改</el-button>
|
<el-button v-hasPerm="['system:user:update']" type="primary" :loading="infoSubmitting" icon="edit" @click="handleSave">保存更改</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -185,7 +185,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" :loading="passwordChanging" icon="edit" @click="handlePasswordChange" v-hasPerm="['current:profile:change_password']">更新密码</el-button>
|
<el-button v-hasPerm="['current:profile:change_password']" type="primary" :loading="passwordChanging" icon="edit" @click="handlePasswordChange">更新密码</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -198,12 +198,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { FormInstance, UploadRequestOptions, UploadFile } from 'element-plus'
|
import type { FormInstance, UploadRequestOptions, UploadFile, ElUpload } from 'element-plus'
|
||||||
import UserAPI, { type InfoFormState, type PasswordFormState } from '@/api/system/user';
|
import UserAPI, { type InfoFormState, type PasswordFormState } from '@/api/system/user';
|
||||||
import { useUserStore, useDictStore } from "@/store";
|
import { useUserStore, useDictStore } from "@/store";
|
||||||
import { useUserStoreHook } from "@/store/modules/user.store";
|
import { useUserStoreHook } from "@/store/modules/user.store";
|
||||||
import { Camera } from '@element-plus/icons-vue';
|
import { Camera } from '@element-plus/icons-vue';
|
||||||
import { ElUpload, ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { nextTick } from 'vue';
|
import { nextTick } from 'vue';
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
|
|||||||
+7
-8
@@ -124,7 +124,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" link icon="RefreshRight" @click="refreshCacheNames" v-hasPerm="['monitor:cache:refresh']" />
|
<el-button v-hasPerm="['monitor:cache:refresh']" type="primary" link icon="RefreshRight" @click="refreshCacheNames"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -134,7 +134,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<el-table-column prop="cache_name" label="缓存名称" show-overflow-tooltip>
|
<el-table-column prop="cache_name" label="缓存名称" show-overflow-tooltip>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button type="primary" link @click="getCacheKeyList(row)" v-hasPerm="['monitor:cache:view']">{{ row.cache_name }}</el-button>
|
<el-button v-hasPerm="['monitor:cache:view']" type="primary" link @click="getCacheKeyList(row)">{{ row.cache_name }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip />
|
<el-table-column prop="remark" label="备注" show-overflow-tooltip />
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-popconfirm class="box-item" :title="`确认删除缓存 ${row.cache_name} 吗?`" placement="top" @confirm="handleClearCacheName(row)">
|
<el-popconfirm class="box-item" :title="`确认删除缓存 ${row.cache_name} 吗?`" placement="top" @confirm="handleClearCacheName(row)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button type="danger" size="small" link icon="delete" v-hasPerm="['monitor:cache:delete']" />
|
<el-button v-hasPerm="['monitor:cache:delete']" type="danger" size="small" link icon="delete"/>
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm>
|
</el-popconfirm>
|
||||||
</template>
|
</template>
|
||||||
@@ -168,7 +168,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" link icon="RefreshRight" @click="refreshCacheKeys" v-hasPerm="['monitor:cache:refresh']" />
|
<el-button v-hasPerm="['monitor:cache:refresh']" type="primary" link icon="RefreshRight" @click="refreshCacheKeys"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -178,15 +178,14 @@
|
|||||||
</template>
|
</template>
|
||||||
<el-table-column prop="cacheKey" label="缓存键名" show-overflow-tooltip>
|
<el-table-column prop="cacheKey" label="缓存键名" show-overflow-tooltip>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button type="primary" link @click="handleCacheValue(row.cacheKey)" v-hasPerm="['monitor:cache:detail']">{{ row.cacheKey
|
<el-button v-hasPerm="['monitor:cache:detail']" type="primary" link @click="handleCacheValue(row.cacheKey)">{{ row.cacheKey}}</el-button>
|
||||||
}}</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="60" align="center">
|
<el-table-column label="操作" width="60" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-popconfirm class="box-item" :title="`确认删除键 ${row.cacheKey} 吗?`" placement="top" @confirm="handleClearCacheKey(row.cacheKey)">
|
<el-popconfirm class="box-item" :title="`确认删除键 ${row.cacheKey} 吗?`" placement="top" @confirm="handleClearCacheKey(row.cacheKey)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button type="danger" size="small" link icon="delete" v-hasPerm="['monitor:cache:delete']" />
|
<el-button v-hasPerm="['monitor:cache:delete']" type="danger" size="small" link icon="delete"/>
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm>
|
</el-popconfirm>
|
||||||
</template>
|
</template>
|
||||||
@@ -212,7 +211,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="danger" link icon="delete" @click="handleClearCacheAll" v-hasPerm="['monitor:cache:delete_all']">清理全部</el-button>
|
<el-button v-hasPerm="['monitor:cache:delete_all']" type="danger" link icon="delete" @click="handleClearCacheAll">清理全部</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
<el-input v-model="queryFormData.name" placeholder="请输入文件名或目录名" clearable />
|
<el-input v-model="queryFormData.name" placeholder="请输入文件名或目录名" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="search-buttons">
|
<el-form-item class="search-buttons">
|
||||||
<el-button type="primary" icon="search" @click="handleQuery" v-hasPerm="['monitor:resource:query']">查询</el-button>
|
<el-button v-hasPerm="['monitor:resource:query']" type="primary" icon="search" @click="handleQuery">查询</el-button>
|
||||||
<el-button icon="refresh" @click="handleResetQuery" v-hasPerm="['monitor:resource:query']">重置</el-button>
|
<el-button v-hasPerm="['monitor:resource:query']" icon="refresh" @click="handleResetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -123,9 +123,9 @@
|
|||||||
<Document v-else />
|
<Document v-else />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<span
|
<span
|
||||||
|
v-hasPerm="['monitor:resource:preview']"
|
||||||
:class="{ 'file-name-clickable': true }"
|
:class="{ 'file-name-clickable': true }"
|
||||||
@click="handleFileNameClick(row)"
|
@click="handleFileNameClick(row)"
|
||||||
v-hasPerm="['monitor:resource:preview']"
|
|
||||||
>
|
>
|
||||||
{{ row.name }}
|
{{ row.name }}
|
||||||
</span>
|
</span>
|
||||||
@@ -147,19 +147,19 @@
|
|||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!row.is_dir"
|
v-if="!row.is_dir"
|
||||||
|
v-hasPerm="['monitor:resource:download']"
|
||||||
type="success"
|
type="success"
|
||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
icon="download"
|
icon="download"
|
||||||
@click="handleDownload(row)"
|
@click="handleDownload(row)"
|
||||||
v-hasPerm="['monitor:resource:download']"
|
|
||||||
>
|
>
|
||||||
下载
|
下载
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" size="small" link icon="edit" @click="handleRename(row)" v-hasPerm="['monitor:resource:rename']">
|
<el-button v-hasPerm="['monitor:resource:rename']" type="primary" size="small" link icon="edit" @click="handleRename(row)">
|
||||||
重命名
|
重命名
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="danger" size="small" link icon="delete" @click="handleDelete(row)" v-hasPerm="['monitor:resource:delete']">
|
<el-button v-hasPerm="['monitor:resource:delete']" type="danger" size="small" link icon="delete" @click="handleDelete(row)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -227,7 +227,7 @@
|
|||||||
</el-upload>
|
</el-upload>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="uploadDialogVisible = false">取消</el-button>
|
<el-button @click="uploadDialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" :loading="uploading" @click="handleUploadConfirm" v-hasPerm="['monitor:resource:upload']">
|
<el-button v-hasPerm="['monitor:resource:upload']" type="primary" :loading="uploading" @click="handleUploadConfirm">
|
||||||
确定上传
|
确定上传
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -250,7 +250,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="createDirDialogVisible = false">取消</el-button>
|
<el-button @click="createDirDialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="handleCreateDirConfirm" v-hasPerm="['monitor:resource:create_dir']">确定</el-button>
|
<el-button v-hasPerm="['monitor:resource:create_dir']" type="primary" @click="handleCreateDirConfirm">确定</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@@ -271,7 +271,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="renameDialogVisible = false">取消</el-button>
|
<el-button @click="renameDialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="handleRenameConfirm" v-hasPerm="['monitor:resource:rename']">确定</el-button>
|
<el-button v-hasPerm="['monitor:resource:rename']" type="primary" @click="handleRenameConfirm">确定</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 查询、重置、展开/收起按钮 -->
|
<!-- 查询、重置、展开/收起按钮 -->
|
||||||
<el-form-item class="search-buttons">
|
<el-form-item class="search-buttons">
|
||||||
<el-button type="primary" icon="search" @click="handleQuery" v-hasPerm="['system:dept:query']">查询</el-button>
|
<el-button v-hasPerm="['system:dept:query']" type="primary" icon="search" @click="handleQuery">查询</el-button>
|
||||||
<el-button icon="refresh" @click="handleResetQuery" v-hasPerm="['system:dept:query']">重置</el-button>
|
<el-button v-hasPerm="['system:dept:query']" icon="refresh" @click="handleResetQuery">重置</el-button>
|
||||||
<!-- 展开/收起 -->
|
<!-- 展开/收起 -->
|
||||||
<template v-if="isExpandable">
|
<template v-if="isExpandable">
|
||||||
<el-link class="ml-3" type="primary" underline="never" @click="isExpand = !isExpand">
|
<el-link class="ml-3" type="primary" underline="never" @click="isExpand = !isExpand">
|
||||||
@@ -82,12 +82,12 @@
|
|||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-tooltip content="刷新">
|
<el-tooltip content="刷新">
|
||||||
<el-button type="primary" icon="refresh" circle @click="handleRefresh" v-hasPerm="['system:dept:refresh']" />
|
<el-button v-hasPerm="['system:dept:refresh']" type="primary" icon="refresh" circle @click="handleRefresh"/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-tooltip content="列表筛选">
|
<el-tooltip content="列表筛选">
|
||||||
<el-dropdown trigger="click" v-hasPerm="['system:dept:filter']">
|
<el-dropdown v-hasPerm="['system:dept:filter']" trigger="click">
|
||||||
<el-button type="default" icon="operation" circle />
|
<el-button type="default" icon="operation" circle />
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
<el-table-column v-if="tableColumns.find(col => col.prop === 'operation')?.show" fixed="right" label="操作" align="center" min-width="200">
|
<el-table-column v-if="tableColumns.find(col => col.prop === 'operation')?.show" fixed="right" label="操作" align="center" min-width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button v-hasPerm="['system:dept:create']" type="success" size="small" link icon="plus" @click="handleOpenDialog('create', undefined, scope.row.id)">新增</el-button>
|
<el-button v-hasPerm="['system:dept:create']" type="success" size="small" link icon="plus" @click="handleOpenDialog('create', undefined, scope.row.id)">新增</el-button>
|
||||||
<el-button type="info" size="small" link icon="document" @click="handleOpenDialog('detail', scope.row.id)" v-hasPerm="['system:dept:detail']">详情</el-button>
|
<el-button v-hasPerm="['system:dept:detail']" type="info" size="small" link icon="document" @click="handleOpenDialog('detail', scope.row.id)">详情</el-button>
|
||||||
<el-button v-hasPerm="['system:dept:update']" type="primary" size="small" link icon="edit" @click="handleOpenDialog('update', scope.row.id)">编辑</el-button>
|
<el-button v-hasPerm="['system:dept:update']" type="primary" size="small" link icon="edit" @click="handleOpenDialog('update', scope.row.id)">编辑</el-button>
|
||||||
<el-button v-hasPerm="['system:dept:delete']" type="danger" size="small" link icon="delete" @click="handleDelete([scope.row.id])">删除</el-button>
|
<el-button v-hasPerm="['system:dept:delete']" type="danger" size="small" link icon="delete" @click="handleDelete([scope.row.id])">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -186,8 +186,8 @@
|
|||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
||||||
<el-button @click="handleCloseDialog">取消</el-button>
|
<el-button @click="handleCloseDialog">取消</el-button>
|
||||||
<el-button v-if="dialogVisible.type !== 'detail'" type="primary" @click="handleSubmit" v-hasPerm="['system:dept:submit']">确定</el-button>
|
<el-button v-if="dialogVisible.type !== 'detail'" v-hasPerm="['system:dept:submit']" type="primary" @click="handleSubmit">确定</el-button>
|
||||||
<el-button v-else type="primary" @click="handleCloseDialog" v-hasPerm="['system:dept:detail']">确定</el-button>
|
<el-button v-else v-hasPerm="['system:dept:detail']" type="primary" @click="handleCloseDialog">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 查询、重置、展开/收起按钮 -->
|
<!-- 查询、重置、展开/收起按钮 -->
|
||||||
<el-form-item class="search-buttons">
|
<el-form-item class="search-buttons">
|
||||||
<el-button type="primary" icon="search" @click="handleQuery" v-hasPerm="['system:dict_type:query']">查询</el-button>
|
<el-button v-hasPerm="['system:dict_type:query']" type="primary" icon="search" @click="handleQuery">查询</el-button>
|
||||||
<el-button icon="refresh" @click="handleResetQuery" v-hasPerm="['system:dict_type:query']">重置</el-button>
|
<el-button v-hasPerm="['system:dict_type:query']" icon="refresh" @click="handleResetQuery">重置</el-button>
|
||||||
<!-- 展开/收起 -->
|
<!-- 展开/收起 -->
|
||||||
<template v-if="isExpandable">
|
<template v-if="isExpandable">
|
||||||
<el-link class="ml-3" type="primary" underline="never" @click="isExpand = !isExpand">
|
<el-link class="ml-3" type="primary" underline="never" @click="isExpand = !isExpand">
|
||||||
@@ -147,10 +147,10 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-if="tableColumns.find(col => col.prop === 'operation')?.show" fixed="right" label="操作" align="center" min-width="260">
|
<el-table-column v-if="tableColumns.find(col => col.prop === 'operation')?.show" fixed="right" label="操作" align="center" min-width="260">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="warning" size="small" link icon="document" @click="handleDictDataDrawer(scope.row.dict_type, scope.row.dict_name)" v-hasPerm="['system:dict_data:query']">字典</el-button>
|
<el-button v-hasPerm="['system:dict_data:query']" type="warning" size="small" link icon="document" @click="handleDictDataDrawer(scope.row.dict_type, scope.row.dict_name)">字典</el-button>
|
||||||
<el-button type="info" size="small" link icon="document" @click="handleOpenDialog('detail', scope.row.id)" v-hasPerm="['system:dict_type:detail']">详情</el-button>
|
<el-button v-hasPerm="['system:dict_type:detail']" type="info" size="small" link icon="document" @click="handleOpenDialog('detail', scope.row.id)">详情</el-button>
|
||||||
<el-button type="primary" size="small" link icon="edit" @click="handleOpenDialog('update', scope.row.id)" v-hasPerm="['system:dict_type:update']">编辑</el-button>
|
<el-button v-hasPerm="['system:dict_type:update']" type="primary" size="small" link icon="edit" @click="handleOpenDialog('update', scope.row.id)">编辑</el-button>
|
||||||
<el-button type="danger" size="small" link icon="delete" @click="handleDelete([scope.row.id])" v-hasPerm="['system:dict_type:delete']">删除</el-button>
|
<el-button v-hasPerm="['system:dict_type:delete']" type="danger" size="small" link icon="delete" @click="handleDelete([scope.row.id])">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -205,8 +205,8 @@
|
|||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
||||||
<el-button @click="handleCloseDialog">取消</el-button>
|
<el-button @click="handleCloseDialog">取消</el-button>
|
||||||
<el-button v-if="dialogVisible.type !== 'detail'" type="primary" @click="handleSubmit" v-hasPerm="['system:dict_type:submit']">确定</el-button>
|
<el-button v-if="dialogVisible.type !== 'detail'" v-hasPerm="['system:dict_type:submit']" type="primary" @click="handleSubmit">确定</el-button>
|
||||||
<el-button v-else type="primary" @click="handleCloseDialog" v-hasPerm="['system:dict_type:detail']">确定</el-button>
|
<el-button v-else v-hasPerm="['system:dict_type:detail']" type="primary" @click="handleCloseDialog">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 查询、重置、展开/收起按钮 -->
|
<!-- 查询、重置、展开/收起按钮 -->
|
||||||
<el-form-item class="search-buttons">
|
<el-form-item class="search-buttons">
|
||||||
<el-button type="primary" icon="search" @click="handleQuery" v-hasPerm="['system:log:query']">查询</el-button>
|
<el-button v-hasPerm="['system:log:query']" type="primary" icon="search" @click="handleQuery">查询</el-button>
|
||||||
<el-button icon="refresh" @click="handleResetQuery" v-hasPerm="['system:log:query']">重置</el-button>
|
<el-button v-hasPerm="['system:log:query']" icon="refresh" @click="handleResetQuery">重置</el-button>
|
||||||
<!-- 展开/收起 -->
|
<!-- 展开/收起 -->
|
||||||
<template v-if="isExpandable">
|
<template v-if="isExpandable">
|
||||||
<el-link class="ml-3" type="primary" underline="never" @click="isExpand = !isExpand">
|
<el-link class="ml-3" type="primary" underline="never" @click="isExpand = !isExpand">
|
||||||
@@ -134,8 +134,8 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="center" min-width="150">
|
<el-table-column label="操作" fixed="right" align="center" min-width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="info" size="small" link icon="document" @click="handleOpenDialog('detail', scope.row.id)" v-hasPerm="['system:log:detail']">详情</el-button>
|
<el-button v-hasPerm="['system:log:detail']" type="info" size="small" link icon="document" @click="handleOpenDialog('detail', scope.row.id)">详情</el-button>
|
||||||
<el-button type="danger" size="small" link icon="delete" @click="handleDelete([scope.row.id])" v-hasPerm="['system:log:delete']">删除</el-button>
|
<el-button v-hasPerm="['system:log:delete']" type="danger" size="small" link icon="delete" @click="handleDelete([scope.row.id])">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -189,7 +189,7 @@
|
|||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
||||||
<el-button @click="handleCloseDialog">取消</el-button>
|
<el-button @click="handleCloseDialog">取消</el-button>
|
||||||
<el-button type="primary" @click="handleCloseDialog" v-hasPerm="['system:log:detail']">确定</el-button>
|
<el-button v-hasPerm="['system:log:detail']" type="primary" @click="handleCloseDialog">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 查询、重置、展开/收起按钮 -->
|
<!-- 查询、重置、展开/收起按钮 -->
|
||||||
<el-form-item class="search-buttons">
|
<el-form-item class="search-buttons">
|
||||||
<el-button type="primary" icon="search" @click="handleQuery" v-hasPerm="['system:menu:query']">查询</el-button>
|
<el-button v-hasPerm="['system:menu:query']" type="primary" icon="search" @click="handleQuery">查询</el-button>
|
||||||
<el-button icon="refresh" @click="handleResetQuery" v-hasPerm="['system:menu:query']">重置</el-button>
|
<el-button v-hasPerm="['system:menu:query']" icon="refresh" @click="handleResetQuery">重置</el-button>
|
||||||
<!-- 展开/收起 -->
|
<!-- 展开/收起 -->
|
||||||
<template v-if="isExpandable">
|
<template v-if="isExpandable">
|
||||||
<el-link class="ml-3" type="primary" underline="never" @click="isExpand = !isExpand">
|
<el-link class="ml-3" type="primary" underline="never" @click="isExpand = !isExpand">
|
||||||
@@ -166,10 +166,10 @@
|
|||||||
|
|
||||||
<el-table-column fixed="right" label="操作" align="center" min-width="260">
|
<el-table-column fixed="right" label="操作" align="center" min-width="260">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button v-if="scope.row.type == MenuTypeEnum.CATALOG || scope.row.type == MenuTypeEnum.MENU" type="success" link size="small" icon="plus" @click.stop="handleOpenDialog('create', undefined, scope.row.id)" v-hasPerm="['system:menu:create']">新增</el-button>
|
<el-button v-if="scope.row.type == MenuTypeEnum.CATALOG || scope.row.type == MenuTypeEnum.MENU" v-hasPerm="['system:menu:create']" type="success" link size="small" icon="plus" @click.stop="handleOpenDialog('create', undefined, scope.row.id)">新增</el-button>
|
||||||
<el-button type="info" size="small" link icon="document" @click="handleOpenDialog('detail', scope.row.id)" v-hasPerm="['system:menu:detail']">详情</el-button>
|
<el-button v-hasPerm="['system:menu:detail']" type="info" size="small" link icon="document" @click="handleOpenDialog('detail', scope.row.id)">详情</el-button>
|
||||||
<el-button type="primary" size="small" link icon="edit" @click="handleOpenDialog('update', scope.row.id)" v-hasPerm="['system:menu:update']">编辑</el-button>
|
<el-button v-hasPerm="['system:menu:update']" type="primary" size="small" link icon="edit" @click="handleOpenDialog('update', scope.row.id)">编辑</el-button>
|
||||||
<el-button type="danger" size="small" link icon="delete" @click="handleDelete([scope.row.id])" v-hasPerm="['system:menu:delete']">删除</el-button>
|
<el-button v-hasPerm="['system:menu:delete']" type="danger" size="small" link icon="delete" @click="handleDelete([scope.row.id])">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -464,8 +464,8 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
||||||
<el-button v-if="dialogVisible.type !== 'detail'" type="primary" @click="handleSubmit" v-hasPerm="['system:menu:submit']">确定</el-button>
|
<el-button v-if="dialogVisible.type !== 'detail'" v-hasPerm="['system:menu:submit']" type="primary" @click="handleSubmit">确定</el-button>
|
||||||
<el-button v-else type="primary" @click="handleCloseDialog" v-hasPerm="['system:menu:detail']">确定</el-button>
|
<el-button v-else v-hasPerm="['system:menu:detail']" type="primary" @click="handleCloseDialog">确定</el-button>
|
||||||
<el-button @click="handleCloseDialog">取消</el-button>
|
<el-button @click="handleCloseDialog">取消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -32,10 +32,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 查询、重置、展开/收起按钮 -->
|
<!-- 查询、重置、展开/收起按钮 -->
|
||||||
<el-form-item class="search-buttons">
|
<el-form-item class="search-buttons">
|
||||||
<el-button type="primary" icon="search" @click="handleQuery" v-hasPerm="['system:notice:query']">
|
<el-button v-hasPerm="['system:notice:query']" type="primary" icon="search" @click="handleQuery">
|
||||||
查询
|
查询
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button icon="refresh" @click="handleResetQuery" v-hasPerm="['system:notice:query']">
|
<el-button v-hasPerm="['system:notice:query']" icon="refresh" @click="handleResetQuery">
|
||||||
重置
|
重置
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 展开/收起 -->
|
<!-- 展开/收起 -->
|
||||||
@@ -96,17 +96,17 @@
|
|||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-tooltip content="导出">
|
<el-tooltip content="导出">
|
||||||
<el-button type="warning" icon="download" circle @click="handleExport" v-hasPerm="['system:notice:export']" />
|
<el-button v-hasPerm="['system:notice:export']" type="warning" icon="download" circle @click="handleExport" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-tooltip content="刷新">
|
<el-tooltip content="刷新">
|
||||||
<el-button type="primary" icon="refresh" circle @click="handleRefresh" v-hasPerm="['system:notice:refresh']" />
|
<el-button v-hasPerm="['system:notice:refresh']" type="primary" icon="refresh" circle @click="handleRefresh" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-tooltip content="列表筛选">
|
<el-tooltip content="列表筛选">
|
||||||
<el-dropdown trigger="click" v-hasPerm="['system:notice:filter']">
|
<el-dropdown v-hasPerm="['system:notice:filter']" trigger="click">
|
||||||
<el-button type="default" icon="operation" circle />
|
<el-button type="default" icon="operation" circle />
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
@@ -162,9 +162,9 @@
|
|||||||
|
|
||||||
<el-table-column v-if="tableColumns.find(col => col.prop === 'operation')?.show" fixed="right" label="操作" align="center" min-width="200">
|
<el-table-column v-if="tableColumns.find(col => col.prop === 'operation')?.show" fixed="right" label="操作" align="center" min-width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="info" size="small" link icon="document" @click="handleOpenDialog('detail', scope.row.id)" v-hasPerm="['system:notice:detail']">详情</el-button>
|
<el-button v-hasPerm="['system:notice:detail']" type="info" size="small" link icon="document" @click="handleOpenDialog('detail', scope.row.id)">详情</el-button>
|
||||||
<el-button type="primary" size="small" link icon="edit" @click="handleOpenDialog('update', scope.row.id)" v-hasPerm="['system:notice:update']">编辑</el-button>
|
<el-button v-hasPerm="['system:notice:update']" type="primary" size="small" link icon="edit" @click="handleOpenDialog('update', scope.row.id)">编辑</el-button>
|
||||||
<el-button type="danger" size="small" link icon="delete" @click="handleDelete([scope.row.id])" v-hasPerm="['system:notice:delete']">删除</el-button>
|
<el-button v-hasPerm="['system:notice:delete']" type="danger" size="small" link icon="delete" @click="handleDelete([scope.row.id])">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -218,7 +218,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="类型" prop="notice_type">
|
<el-form-item label="类型" prop="notice_type">
|
||||||
<el-select v-model="formData.notice_type" placeholder="请选择类型" clearable>
|
<el-select v-model="formData.notice_type" placeholder="请选择类型" clearable>
|
||||||
<el-option v-for="item in dictStore.getDictArray('sys_notice_type')"
|
<el-option
|
||||||
|
v-for="item in dictStore.getDictArray('sys_notice_type')"
|
||||||
:key="item.dict_value"
|
:key="item.dict_value"
|
||||||
:value="item.dict_value"
|
:value="item.dict_value"
|
||||||
:label="item.dict_label"
|
:label="item.dict_label"
|
||||||
@@ -250,8 +251,8 @@
|
|||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
||||||
<el-button @click="handleCloseDialog">取消</el-button>
|
<el-button @click="handleCloseDialog">取消</el-button>
|
||||||
<el-button v-if="dialogVisible.type !== 'detail'" type="primary" @click="handleSubmit" v-hasPerm="['system:notice:submit']">确定</el-button>
|
<el-button v-if="dialogVisible.type !== 'detail'" v-hasPerm="['system:notice:submit']" type="primary" @click="handleSubmit">确定</el-button>
|
||||||
<el-button v-else type="primary" @click="handleCloseDialog" v-hasPerm="['system:notice:detail']">确定</el-button>
|
<el-button v-else v-hasPerm="['system:notice:detail']" type="primary" @click="handleCloseDialog">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|||||||
+1
-1
@@ -40,7 +40,7 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
<el-button @click="resetForm">取消</el-button>
|
<el-button @click="resetForm">取消</el-button>
|
||||||
<el-button type="primary" :disabled="!hasChanges" @click="submitChanges" v-hasPerm="['system:config:update']">保存</el-button>
|
<el-button v-hasPerm="['system:config:update']" type="primary" :disabled="!hasChanges" @click="submitChanges">保存</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
+8
-8
@@ -24,8 +24,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="search-buttons">
|
<el-form-item class="search-buttons">
|
||||||
<el-button type="primary" icon="search" @click="handleQuery" v-hasPerm="['system:config:query']">查询</el-button>
|
<el-button v-hasPerm="['system:config:query']" type="primary" icon="search" @click="handleQuery">查询</el-button>
|
||||||
<el-button icon="refresh" @click="handleResetQuery" v-hasPerm="['system:config:query']">重置</el-button>
|
<el-button v-hasPerm="['system:config:query']" icon="refresh" @click="handleResetQuery">重置</el-button>
|
||||||
<!-- 展开/收起 -->
|
<!-- 展开/收起 -->
|
||||||
<template v-if="isExpandable">
|
<template v-if="isExpandable">
|
||||||
<el-link class="ml-3" type="primary" underline="never" @click="isExpand = !isExpand">
|
<el-link class="ml-3" type="primary" underline="never" @click="isExpand = !isExpand">
|
||||||
@@ -129,9 +129,9 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column v-if="tableColumns.find(col => col.prop === 'operation')?.show" fixed="right" label="操作" align="center" min-width="200">
|
<el-table-column v-if="tableColumns.find(col => col.prop === 'operation')?.show" fixed="right" label="操作" align="center" min-width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="info" size="small" link icon="document" @click="handleOpenDialog('detail', scope.row.id)" v-hasPerm="['system:config:detail']">详情</el-button>
|
<el-button v-hasPerm="['system:config:detail']" type="info" size="small" link icon="document" @click="handleOpenDialog('detail', scope.row.id)">详情</el-button>
|
||||||
<el-button type="primary" size="small" link icon="edit" @click="handleOpenDialog('update', scope.row.id)" v-hasPerm="['system:config:update']">编辑</el-button>
|
<el-button v-hasPerm="['system:config:update']" type="primary" size="small" link icon="edit" @click="handleOpenDialog('update', scope.row.id)">编辑</el-button>
|
||||||
<el-button type="danger" size="small" link icon="delete" @click="handleDelete([scope.row.id])" v-hasPerm="['system:config:delete']">删除</el-button>
|
<el-button v-hasPerm="['system:config:delete']" type="danger" size="small" link icon="delete" @click="handleDelete([scope.row.id])">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -188,8 +188,8 @@
|
|||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
||||||
<el-button @click="handleCloseDialog">取消</el-button>
|
<el-button @click="handleCloseDialog">取消</el-button>
|
||||||
<el-button v-if="dialogVisible.type !== 'detail'" type="primary" @click="handleSubmit" v-hasPerm="['system:config:submit']">确定</el-button>
|
<el-button v-if="dialogVisible.type !== 'detail'" v-hasPerm="['system:config:create']" type="primary" @click="handleSubmit">确定</el-button>
|
||||||
<el-button v-else type="primary" @click="handleCloseDialog" v-hasPerm="['system:config:detail']">确定</el-button>
|
<el-button v-else v-hasPerm="['system:config:detail']" type="primary" @click="handleCloseDialog">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "Config",
|
name: "Params",
|
||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -22,8 +22,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 查询、重置、展开/收起按钮 -->
|
<!-- 查询、重置、展开/收起按钮 -->
|
||||||
<el-form-item class="search-buttons">
|
<el-form-item class="search-buttons">
|
||||||
<el-button type="primary" icon="search" @click="handleQuery" v-hasPerm="['system:position:query']">查询</el-button>
|
<el-button v-hasPerm="['system:position:query']" type="primary" icon="search" @click="handleQuery">查询</el-button>
|
||||||
<el-button icon="refresh" @click="handleResetQuery" v-hasPerm="['system:position:query']">重置</el-button>
|
<el-button v-hasPerm="['system:position:query']" icon="refresh" @click="handleResetQuery">重置</el-button>
|
||||||
<!-- 展开/收起 -->
|
<!-- 展开/收起 -->
|
||||||
<template v-if="isExpandable">
|
<template v-if="isExpandable">
|
||||||
<el-link class="ml-3" type="primary" underline="never" @click="isExpand = !isExpand">
|
<el-link class="ml-3" type="primary" underline="never" @click="isExpand = !isExpand">
|
||||||
@@ -82,12 +82,12 @@
|
|||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-tooltip content="导出">
|
<el-tooltip content="导出">
|
||||||
<el-button type="warning" icon="download" circle @click="handleExport" v-hasPerm="['system:position:export']" />
|
<el-button v-hasPerm="['system:position:export']" type="warning" icon="download" circle @click="handleExport" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-tooltip content="刷新">
|
<el-tooltip content="刷新">
|
||||||
<el-button type="primary" icon="refresh" circle @click="handleRefresh" v-hasPerm="['system:position:refresh']" />
|
<el-button v-hasPerm="['system:position:refresh']" type="primary" icon="refresh" circle @click="handleRefresh" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -139,9 +139,9 @@
|
|||||||
|
|
||||||
<el-table-column v-if="tableColumns.find(col => col.prop === 'operation')?.show" fixed="right" label="操作" align="center" min-width="200">
|
<el-table-column v-if="tableColumns.find(col => col.prop === 'operation')?.show" fixed="right" label="操作" align="center" min-width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="info" size="small" link icon="document" @click="handleOpenDialog('detail', scope.row.id)" v-hasPerm="['system:position:detail']">详情</el-button>
|
<el-button v-hasPerm="['system:position:detail']" type="info" size="small" link icon="document" @click="handleOpenDialog('detail', scope.row.id)">详情</el-button>
|
||||||
<el-button type="primary" size="small" link icon="edit" @click="handleOpenDialog('update', scope.row.id)" v-hasPerm="['system:position:update']">编辑</el-button>
|
<el-button v-hasPerm="['system:position:update']" type="primary" size="small" link icon="edit" @click="handleOpenDialog('update', scope.row.id)">编辑</el-button>
|
||||||
<el-button type="danger" size="small" link icon="delete" @click="handleDelete([scope.row.id])" v-hasPerm="['system:position:delete']">删除</el-button>
|
<el-button v-hasPerm="['system:position:delete']" type="danger" size="small" link icon="delete" @click="handleDelete([scope.row.id])">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -196,8 +196,8 @@
|
|||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
||||||
<el-button @click="handleCloseDialog">取消</el-button>
|
<el-button @click="handleCloseDialog">取消</el-button>
|
||||||
<el-button v-if="dialogVisible.type !== 'detail'" type="primary" @click="handleSubmit" v-hasPerm="['system:position:submit']">确定</el-button>
|
<el-button v-if="dialogVisible.type !== 'detail'" v-hasPerm="['system:position:submit']" type="primary" @click="handleSubmit">确定</el-button>
|
||||||
<el-button v-else type="primary" @click="handleCloseDialog" v-hasPerm="['system:position:detail']">确定</el-button>
|
<el-button v-else v-hasPerm="['system:position:detail']" type="primary" @click="handleCloseDialog">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<div class="mt-5 max-h-[60vh] b-1 b-solid b-[#e5e7eb] p-10px overflow-auto box-border" v-if="permissionState.data_scope === 5 && deptTreeData.length">
|
<div v-if="permissionState.data_scope === 5 && deptTreeData.length" class="mt-5 max-h-[60vh] b-1 b-solid b-[#e5e7eb] p-10px overflow-auto box-border">
|
||||||
<el-input v-model="deptFilterText" placeholder="部门名称" />
|
<el-input v-model="deptFilterText" placeholder="部门名称" />
|
||||||
<el-tree
|
<el-tree
|
||||||
ref="deptTreeRef"
|
ref="deptTreeRef"
|
||||||
@@ -46,8 +46,8 @@
|
|||||||
default-expand-all
|
default-expand-all
|
||||||
:highlight-current="true"
|
:highlight-current="true"
|
||||||
:check-strictly="!parentChildLinked"
|
:check-strictly="!parentChildLinked"
|
||||||
@check="deptTreeCheck"
|
|
||||||
style="height: calc(100% - 60px); overflow-y: auto; margin-top: 10px;"
|
style="height: calc(100% - 60px); overflow-y: auto; margin-top: 10px;"
|
||||||
|
@check="deptTreeCheck"
|
||||||
>
|
>
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<el-empty :image-size="80" description="暂无数据" />
|
<el-empty :image-size="80" description="暂无数据" />
|
||||||
@@ -108,8 +108,9 @@
|
|||||||
default-expand-all
|
default-expand-all
|
||||||
:highlight-current="true"
|
:highlight-current="true"
|
||||||
:check-strictly="!parentChildLinked"
|
:check-strictly="!parentChildLinked"
|
||||||
|
style="height: calc(100% - 60px); overflow: auto; margin-top: 10px;"
|
||||||
@check="menuTreeCheck"
|
@check="menuTreeCheck"
|
||||||
style="height: calc(100% - 60px); overflow: auto; margin-top: 10px;">
|
>
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<el-empty :image-size="80" description="暂无数据" />
|
<el-empty :image-size="80" description="暂无数据" />
|
||||||
</template>
|
</template>
|
||||||
@@ -188,11 +189,11 @@ const init = async () => {
|
|||||||
try {
|
try {
|
||||||
// 获取全部部门树
|
// 获取全部部门树
|
||||||
const deptResponse = await DeptAPI.getDeptList();
|
const deptResponse = await DeptAPI.getDeptList();
|
||||||
deptTreeData.value = formatTree(listToTree(deptResponse.data.data.items));
|
deptTreeData.value = formatTree(listToTree(deptResponse.data.data));
|
||||||
|
|
||||||
// 获取全部菜单树
|
// 获取全部菜单树
|
||||||
const menuResponse = await MenuAPI.getMenuList();
|
const menuResponse = await MenuAPI.getMenuList();
|
||||||
menuTreeData.value = formatTree(listToTree(menuResponse.data.data.items));
|
menuTreeData.value = formatTree(listToTree(menuResponse.data.data));
|
||||||
|
|
||||||
// 获取角色详情
|
// 获取角色详情
|
||||||
const roleResponse = await RoleAPI.getRoleDetail(props.roleId);
|
const roleResponse = await RoleAPI.getRoleDetail(props.roleId);
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 查询、重置、展开/收起按钮 -->
|
<!-- 查询、重置、展开/收起按钮 -->
|
||||||
<el-form-item class="search-buttons">
|
<el-form-item class="search-buttons">
|
||||||
<el-button type="primary" icon="search" @click="handleQuery" v-hasPerm="['system:role:query']">查询</el-button>
|
<el-button v-hasPerm="['system:role:query']" type="primary" icon="search" @click="handleQuery">查询</el-button>
|
||||||
<el-button icon="refresh" @click="handleResetQuery" v-hasPerm="['system:role:query']">重置</el-button>
|
<el-button v-hasPerm="['system:role:query']" icon="refresh" @click="handleResetQuery">重置</el-button>
|
||||||
<!-- 展开/收起 -->
|
<!-- 展开/收起 -->
|
||||||
<template v-if="isExpandable">
|
<template v-if="isExpandable">
|
||||||
<el-link class="ml-3" type="primary" underline="never" @click="isExpand = !isExpand">
|
<el-link class="ml-3" type="primary" underline="never" @click="isExpand = !isExpand">
|
||||||
@@ -87,12 +87,12 @@
|
|||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-tooltip content="导出">
|
<el-tooltip content="导出">
|
||||||
<el-button type="warning" icon="download" circle @click="handleExport" v-hasPerm="['system:role:export']" />
|
<el-button v-hasPerm="['system:role:export']" type="warning" icon="download" circle @click="handleExport" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-tooltip content="刷新">
|
<el-tooltip content="刷新">
|
||||||
<el-button type="primary" icon="refresh" circle @click="handleRefresh" v-hasPerm="['system:role:refresh']" />
|
<el-button v-hasPerm="['system:role:refresh']" type="primary" icon="refresh" circle @click="handleRefresh" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -163,12 +163,12 @@
|
|||||||
@click="scope.row.id === 1 ? ElMessage.warning('系统默认角色,不可操作') : handleOpenAssignPermDialog(scope.row.id, scope.row.name)"
|
@click="scope.row.id === 1 ? ElMessage.warning('系统默认角色,不可操作') : handleOpenAssignPermDialog(scope.row.id, scope.row.name)"
|
||||||
>分配权限</el-button>
|
>分配权限</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-hasPerm="['system:role:detail']"
|
||||||
type="info"
|
type="info"
|
||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
icon="document"
|
icon="document"
|
||||||
@click="handleOpenDialog('detail', scope.row.id)"
|
@click="handleOpenDialog('detail', scope.row.id)"
|
||||||
v-hasPerm="['system:role:detail']"
|
|
||||||
>详情</el-button>
|
>详情</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-hasPerm="['system:role:update']"
|
v-hasPerm="['system:role:update']"
|
||||||
@@ -258,7 +258,7 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="handleCloseDialog">取 消</el-button>
|
<el-button @click="handleCloseDialog">取 消</el-button>
|
||||||
<el-button type="primary" @click="handleSubmit" v-hasPerm="['system:role:submit']">确 定</el-button>
|
<el-button v-hasPerm="['system:role:submit']" type="primary" @click="handleSubmit">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|||||||
@@ -9,7 +9,10 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
|
|
||||||
<el-tree ref="deptTreeRef" class="mt-2" :data="deptOptions"
|
<el-tree
|
||||||
|
ref="deptTreeRef"
|
||||||
|
class="mt-2"
|
||||||
|
:data="deptOptions"
|
||||||
:props="{ children: 'children', label: 'label', disabled: '' }"
|
:props="{ children: 'children', label: 'label', disabled: '' }"
|
||||||
:expand-on-click-node="false"
|
:expand-on-click-node="false"
|
||||||
:filter-node-method="handleFilter"
|
:filter-node-method="handleFilter"
|
||||||
|
|||||||
@@ -33,8 +33,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 查询、重置、展开/收起按钮 -->
|
<!-- 查询、重置、展开/收起按钮 -->
|
||||||
<el-form-item class="search-buttons">
|
<el-form-item class="search-buttons">
|
||||||
<el-button type="primary" icon="search" @click="handleQuery" v-hasPerm="['system:user:query']">查询</el-button>
|
<el-button v-hasPerm="['system:user:query']" type="primary" icon="search" @click="handleQuery">查询</el-button>
|
||||||
<el-button icon="refresh" @click="handleResetQuery" v-hasPerm="['system:user:query']">重置</el-button>
|
<el-button v-hasPerm="['system:user:query']" icon="refresh" @click="handleResetQuery">重置</el-button>
|
||||||
<!-- 展开/收起 -->
|
<!-- 展开/收起 -->
|
||||||
<template v-if="isExpandable">
|
<template v-if="isExpandable">
|
||||||
<el-link class="ml-3" type="primary" underline="never" @click="isExpand = !isExpand">
|
<el-link class="ml-3" type="primary" underline="never" @click="isExpand = !isExpand">
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-tooltip content="刷新">
|
<el-tooltip content="刷新">
|
||||||
<el-button type="default" icon="refresh" circle @click="handleRefresh" v-hasPerm="['system:user:refresh']" />
|
<el-button v-hasPerm="['system:user:refresh']" type="default" icon="refresh" circle @click="handleRefresh"/>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -178,12 +178,12 @@
|
|||||||
@click="hancleResetPassword(scope.row)"
|
@click="hancleResetPassword(scope.row)"
|
||||||
>重置密码</el-button>
|
>重置密码</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
v-hasPerm="['system:user:detail']"
|
||||||
type="info"
|
type="info"
|
||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
icon="document"
|
icon="document"
|
||||||
@click="handleOpenDialog('detail', scope.row.id)"
|
@click="handleOpenDialog('detail', scope.row.id)"
|
||||||
v-hasPerm="['system:user:detail']"
|
|
||||||
>详情</el-button>
|
>详情</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.username !== 'admin'"
|
v-if="scope.row.username !== 'admin'"
|
||||||
@@ -323,8 +323,8 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
<!-- 详情弹窗不需要确定按钮的提交逻辑 -->
|
||||||
<el-button v-if="dialogVisible.type === 'create' || dialogVisible.type === 'update'" type="primary" @click="handleSubmit" v-hasPerm="['system:user:submit']">确定</el-button>
|
<el-button v-if="dialogVisible.type === 'create' || dialogVisible.type === 'update'" v-hasPerm="['system:user:create']" type="primary" @click="handleSubmit">确定</el-button>
|
||||||
<el-button v-else type="primary" @click="handleCloseDialog" v-hasPerm="['system:user:detail']">确定</el-button>
|
<el-button v-else v-hasPerm="['system:user:detail']" type="primary" @click="handleCloseDialog">确定</el-button>
|
||||||
<el-button @click="handleCloseDialog">取消</el-button>
|
<el-button @click="handleCloseDialog">取消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -333,7 +333,7 @@
|
|||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button type="primary" @click="handleSubmit" v-hasPerm="['system:user:submit']">确 定</el-button>
|
<el-button v-hasPerm="['system:user:submit']" type="primary" @click="handleSubmit">确 定</el-button>
|
||||||
<el-button @click="handleCloseDialog">取 消</el-button>
|
<el-button @click="handleCloseDialog">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user