补全功能模块的授权问题

main
huojin\hj 2025-06-06 16:47:53 +08:00
parent 367886890f
commit 9c261a8f6a
33 changed files with 500 additions and 428 deletions

View File

@ -42,7 +42,7 @@
</template>
新建
</a-button>
<a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'address:batchDelete'"
<a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'address:delete'"
:disabled="selectedRowKeyList.length == 0">
<template #icon>
<DeleteOutlined/>

View File

@ -48,7 +48,7 @@
</template>
新建
</a-button>
<a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'area:batchDelete'"
<a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'area:delete'"
:disabled="selectedRowKeyList.length == 0">
<template #icon>
<DeleteOutlined/>

View File

@ -48,7 +48,7 @@
</template>
新建
</a-button>
<a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'customer:batchDelete'"
<a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'customer:delete'"
:disabled="selectedRowKeyList.length == 0">
<template #icon>
<DeleteOutlined/>

View File

@ -49,7 +49,7 @@
</template>
新建
</a-button>
<a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'item:batchDelete'"
<a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'item:delete'"
:disabled="selectedRowKeyList.length == 0">
<template #icon>
<DeleteOutlined/>

View File

@ -57,7 +57,7 @@
</template>
新建
</a-button>
<a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'location:batchDelete'"
<a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'location:delete'"
:disabled="selectedRowKeyList.length == 0">
<template #icon>
<DeleteOutlined/>

View File

@ -56,7 +56,7 @@
</template>
新建
</a-button>
<a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'stock:batchDelete'"
<a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'stock:delete'"
:disabled="selectedRowKeyList.length == 0">
<template #icon>
<DeleteOutlined/>

View File

@ -0,0 +1,30 @@
<!--
* 积木大屏
*
* @Author: hj
* @Date: 2024-12-26 15:35:23
* @Copyright 友仓
-->
<template>
<iframe
width="100%"
:src="url"
frameborder="0"
allowfullscreen
class="no-scrollbar"
/>
</template>
<script setup lang="ts">
import { localRead } from "/@/utils/local-util";
import LocalStorageKeyConst from "/@/constants/local-storage-key-const";
const base = import.meta.env.VITE_APP_API_URL;
const token = localRead(LocalStorageKeyConst.USER_TOKEN);
const url = `${base}/drag/list?token=${token}`;
</script>
<style scoped>.no-scrollbar {
overflow: hidden; /* 隐藏滚动条 */
height: 100vh; /* 使用视口高度 */
}
</style>

View File

@ -0,0 +1,30 @@
<!--
* 积木报表
*
* @Author: hj
* @Date: 2024-12-26 15:35:23
* @Copyright 友仓
-->
<template>
<iframe
width="100%"
:src="url"
frameborder="0"
allowfullscreen
class="no-scrollbar"
/>
</template>
<script setup lang="ts">
import { localRead } from "/@/utils/local-util";
import LocalStorageKeyConst from "/@/constants/local-storage-key-const";
const base = import.meta.env.VITE_APP_API_URL;
const token = localRead(LocalStorageKeyConst.USER_TOKEN);
const url = `${base}/jmreport/list?token=${token}`;
</script>
<style scoped>.no-scrollbar {
overflow: hidden; /* 隐藏滚动条 */
height: 100vh; /* 使用视口高度 */
}
</style>

View File

@ -53,7 +53,7 @@
</template>
新建
</a-button>
<a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'asn:batchDelete'"
<a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'asn:delete'"
:disabled="selectedRowKeyList.length == 0">
<template #icon>
<DeleteOutlined/>

View File

@ -32,7 +32,7 @@
</template>
批量收货
</a-button>
<a-button class="button-style" type="primary" v-privilege="'asnDetail:batchDelete'" @click="confirmBatchDelete"
<a-button class="button-style" type="primary" v-privilege="'asnDetail:delete'" @click="confirmBatchDelete"
danger
:disabled="props.asnId==0 || selectedRowKeyList.length == 0">
<template #icon>

View File

@ -57,7 +57,7 @@
</template>
新建
</a-button>
<a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'pick:batchDelete'"
<a-button @click="confirmBatchDelete" type="primary" danger v-privilege="'pick:delete'"
:disabled="selectedRowKeyList.length == 0">
<template #icon>
<DeleteOutlined/>

View File

@ -26,7 +26,7 @@
添加明细
</a-button>
<a-button class="button-style" type="primary" v-privilege="'pickDetail:batchDelete'" @click="confirmBatchDelete"
<a-button class="button-style" type="primary" v-privilege="'pickDetail:delete'" @click="confirmBatchDelete"
danger
:disabled="props.pickId==0 || selectedRowKeyList.length == 0">
<template #icon>

View File

@ -39,7 +39,7 @@
<a-input-number v-model:value="requestEncryptForm.age" placeholder="年龄" />
</a-form-item>
<a-form-item class="smart-query-form-item">
<a-button type="primary" @click="testRequestEncrypt"> </a-button>
<a-button type="primary" v-privilege="'support:apiEncrypt:testRequestEncrypt'" @click="testRequestEncrypt"> </a-button>
</a-form-item>
</a-row>
<a-row class="smart-query-form-row">
@ -66,7 +66,7 @@
<a-input-number v-model:value="responseEncryptForm.age" placeholder="年龄" />
</a-form-item>
<a-form-item class="smart-query-form-item">
<a-button type="primary" @click="testResponseEncrypt"> </a-button>
<a-button type="primary" v-privilege="'support:apiEncrypt:testResponseEncrypt'" @click="testResponseEncrypt"> </a-button>
</a-form-item>
</a-row>
<a-row class="smart-query-form-row">
@ -94,7 +94,7 @@
<a-input-number v-model:value="form.age" placeholder="年龄" />
</a-form-item>
<a-form-item class="smart-query-form-item">
<a-button type="primary" @click="testBoth"> </a-button>
<a-button type="primary" v-privilege="'support:apiEncrypt:testDecryptAndEncrypt'" @click="testBoth"> </a-button>
</a-form-item>
</a-row>
<a-row class="smart-query-form-row">
@ -119,7 +119,7 @@
<a-form class="smart-query-form">
<a-row class="smart-query-form-row">
<a-form-item class="smart-query-form-item">
<a-button type="primary" @click="testArray"> </a-button>
<a-button type="primary" v-privilege="'support:apiEncrypt:testArray'" @click="testArray"> </a-button>
</a-form-item>
</a-row>
<a-row class="smart-query-form-row">

View File

@ -16,13 +16,13 @@
<a-form-item class="smart-query-form-item smart-margin-left10">
<a-button-group>
<a-button type="primary" @click="onSearch">
<a-button type="primary" @click="onSearch" v-privilege="'support:codeGenerator:queryTableList'">
<template #icon>
<SearchOutlined />
</template>
查询
</a-button>
<a-button @click="resetQuery">
<a-button @click="resetQuery" v-privilege="'support:codeGenerator:queryTableList'">
<template #icon>
<ReloadOutlined />
</template>
@ -54,9 +54,9 @@
</template>
<template v-if="column.dataIndex === 'action'">
<div class="smart-table-operate">
<a-button @click="showConfig(record)" type="link">代码配置</a-button>
<a-button @click="showPreview(record)" type="link">代码预览</a-button>
<a-button @click="download(record)" type="link">下载代码</a-button>
<a-button @click="showConfig(record)" v-privilege="'support:codeGenerator:getConfig'" type="link"></a-button>
<a-button @click="showPreview(record)" v-privilege="'support:codeGenerator:preview'" type="link"></a-button>
<a-button @click="download(record)" v-privilege="'support:codeGenerator:download'" type="link"></a-button>
</div>
</template>
</template>

View File

@ -77,7 +77,7 @@
<template #footer>
<a-space>
<a-button @click="onClose"></a-button>
<a-button type="primary" @click="save"></a-button>
<a-button type="primary" v-privilege="'support:codeGenerator:updateConfig'" @click="save"></a-button>
</a-space>
</template>
</a-drawer>

View File

@ -18,12 +18,16 @@
</a-form-item>
<a-form-item class="smart-query-form-item smart-margin-left10">
<a-button type="primary" @click="queryData">
<template #icon> <SearchOutlined /> </template>
<a-button type="primary" @click="queryData" v-privilege="'support:dictData:query'">
<template #icon>
<SearchOutlined/>
</template>
查询
</a-button>
<a-button @click="resetQuery" class="smart-margin-left10">
<template #icon> <ReloadOutlined /> </template>
<a-button @click="resetQuery" class="smart-margin-left10" v-privilege="'support:dictData:query'">
<template #icon>
<ReloadOutlined/>
</template>
重置
</a-button>
</a-form-item>
@ -67,6 +71,7 @@
<template #bodyCell="{ record, column }">
<template v-if="column.dataIndex === 'disabledFlag'">
<a-switch
v-privilege="'support:dictData:updateDisabled'"
@change="(checked) => handleChangeDisabled(checked, record)"
v-model:checked="record.enabled"
checked-children="启用中"
@ -222,7 +227,8 @@
batchDelete();
},
cancelText: '取消',
onCancel() {},
onCancel() {
},
});
}
@ -242,6 +248,7 @@
// ----------------------- ------------------------
const dictDataFormModalRef = ref();
function addOrUpdateData(rowData) {
dictDataFormModalRef.value.showModal(rowData, dictId.value, dictCode.value);
}

View File

@ -17,13 +17,13 @@
</a-form-item>
<a-form-item class="smart-query-form-item smart-margin-left10">
<a-button-group>
<a-button type="primary" @click="onSearch" v-privilege="'support:dict:add'">
<a-button type="primary" @click="onSearch" v-privilege="'support:dict:query'">
<template #icon>
<SearchOutlined />
</template>
查询
</a-button>
<a-button @click="resetQuery" v-privilege="'support:dict:add'">
<a-button @click="resetQuery" v-privilege="'support:dict:query'">
<template #icon>
<ReloadOutlined />
</template>
@ -78,6 +78,7 @@
</template>
<template v-if="column.dataIndex === 'disabledFlag'">
<a-switch
v-privilege="'support:dict:updateDisabled'"
@change="(checked) => handleChangeDisabled(checked, record)"
v-model:checked="record.enabled"
checked-children="启用中"

View File

@ -7,10 +7,11 @@
-->
<template>
<!---------- 查询表单form begin ----------->
<a-form class="smart-query-form" v-privilege="'support:file:query'">
<a-form class="smart-query-form">
<a-row class="smart-query-form-row">
<a-form-item label="文件夹类型" class="smart-query-form-item">
<SmartEnumSelect width="150px" v-model:value="queryForm.folderType" enumName="FILE_FOLDER_TYPE_ENUM" placeholder="文件夹类型" />
<SmartEnumSelect width="150px" v-model:value="queryForm.folderType" enumName="FILE_FOLDER_TYPE_ENUM"
placeholder="文件夹类型"/>
</a-form-item>
<a-form-item label="文件名" class="smart-query-form-item">
<a-input style="width: 150px" v-model:value="queryForm.fileName" placeholder="文件名"/>
@ -25,17 +26,18 @@
<a-input style="width: 150px" v-model:value="queryForm.creatorName" placeholder="创建人"/>
</a-form-item>
<a-form-item label="创建时间" class="smart-query-form-item">
<a-range-picker v-model:value="queryForm.createTime" :presets="defaultTimeRanges" style="width: 220px" @change="onChangeCreateTime" />
<a-range-picker v-model:value="queryForm.createTime" :presets="defaultTimeRanges" style="width: 220px"
@change="onChangeCreateTime"/>
</a-form-item>
<a-form-item class="smart-query-form-item">
<a-button-group>
<a-button type="primary" @click="queryData">
<a-button type="primary" @click="queryData" v-privilege="'support:file:query'">
<template #icon>
<SearchOutlined/>
</template>
查询
</a-button>
<a-button @click="resetQuery">
<a-button @click="resetQuery" v-privilege="'support:file:query'">
<template #icon>
<ReloadOutlined/>
</template>
@ -84,8 +86,8 @@
</template>
<template v-if="column.dataIndex === 'action'">
<div class="smart-table-operate">
<a-button @click="view(record)" type="link">查看</a-button>
<a-button @click="download(record)" type="link">下载</a-button>
<a-button @click="view(record)" v-privilege="'support:file:getFileUrl'" type="link"></a-button>
<a-button @click="download(record)" v-privilege="'support:file:download'" type="link"></a-button>
</div>
</template>
</template>
@ -112,6 +114,7 @@
<a-modal v-model:open="uploadModalFlag" title="上传文件" @onCancel="hideUploadModal" @ok="hideUploadModal">
<FileUpload
v-privilege="'support:file:upload'"
list-type="text"
:maxUploadSize="5"
buttonText="点击上传文件"
@ -263,6 +266,7 @@
//
const filePreviewModalRef = ref();
function view(file) {
filePreviewModalRef.value.showPreview(file);
}

View File

@ -39,13 +39,13 @@
<a-form-item class="smart-query-form-item smart-margin-left10">
<a-button-group>
<a-button type="primary" @click="onSearch">
<a-button type="primary" @click="onSearch" v-privilege="'support:heartBeat:query'">
<template #icon>
<SearchOutlined />
</template>
查询
</a-button>
<a-button @click="resetQuery">
<a-button @click="resetQuery" v-privilege="'support:heartBeat:query'">
<template #icon>
<ReloadOutlined />
</template>

View File

@ -118,7 +118,7 @@
<a-button v-privilege="'support:job:update'" @click="openUpdateModal(record)" type="link"></a-button>
<a-button v-privilege="'support:job:execute'" type="link" @click="openExecuteModal(record)"></a-button>
<a-button v-privilege="'support:job:log:query'" @click="openJobLogModal(record.jobId, record.jobName)" type="link"></a-button>
<a-button danger v-privilege="'support:job:log:delete'" @click="confirmDelete(record.jobId, record.jobName)" type="link"
<a-button danger v-privilege="'support:job:delete'" @click="confirmDelete(record.jobId, record.jobName)" type="link"
>删除</a-button
>
</div>

View File

@ -30,7 +30,7 @@
<a-row class="smart-query-form-row">
<a-form-item class="smart-query-form-item smart-margin-left10">
<a-button-group>
<a-button type="primary" @click="onSearch">
<a-button type="primary" @click="onSearch" v-privilege="'support:dataMasking:query'">
<template #icon>
<SearchOutlined />
</template>

View File

@ -96,9 +96,9 @@
</a-form-item>
<br />
<a-form-item :wrapper-col="{ span: 14, offset: 6 }">
<a-button type="primary" style="margin-right: 20px" @click.prevent="onSubmit">保存配置</a-button>
<a-button style="margin-right: 20px" @click="reset"></a-button>
<a-button danger @click="clear"></a-button>
<a-button type="primary" style="margin-right: 20px" v-privilege="'support:level3protect:updateConfig'" @click.prevent="onSubmit"></a-button>
<a-button style="margin-right: 20px" @click="reset" v-privilege="'support:level3protect:updateConfig'"></a-button>
<a-button danger @click="clear" v-privilege="'support:level3protect:updateConfig'"></a-button>
</a-form-item>
</a-form>
</a-card>

View File

@ -51,7 +51,7 @@
<!---------- 表格操作行 begin ----------->
<a-row class="smart-table-btn-block">
<div class="smart-table-operate-block">
<a-button @click="confirmBatchDelete" danger :disabled="selectedRowKeyList.length === 0">
<a-button @click="confirmBatchDelete" v-privilege="'support:loginFail:batchDelete'" danger :disabled="selectedRowKeyList.length === 0">
<template #icon>
<DeleteOutlined />
</template>
@ -59,7 +59,7 @@
</a-button>
</div>
<div class="smart-table-setting-block">
<TableOperator v-model="columns" :tableId="null" :refresh="queryData" />
<TableOperator v-model="columns" :tableId="null" :refresh="queryData" v-privilege="'support:loginFail:queryPage'" />
</div>
</a-row>
<!---------- 表格操作行 end ----------->

View File

@ -23,13 +23,13 @@
<a-form-item class="smart-query-form-item smart-margin-left10">
<a-button-group>
<a-button type="primary" @click="onSearch">
<a-button type="primary" @click="onSearch" v-privilege="'support:loginLog:query'">
<template #icon>
<SearchOutlined />
</template>
查询
</a-button>
<a-button @click="resetQuery">
<a-button @click="resetQuery" v-privilege="'support:loginLog:query'">
<template #icon>
<ReloadOutlined />
</template>

View File

@ -33,13 +33,13 @@
<a-form-item class="smart-query-form-item smart-margin-left10">
<a-button-group>
<a-button type="primary" @click="ajaxQuery">
<a-button type="primary" @click="ajaxQuery" v-privilege="'support:operateLog:query'">
<template #icon>
<SearchOutlined />
</template>
查询
</a-button>
<a-button @click="resetQuery">
<a-button @click="resetQuery" v-privilege="'support:operateLog:query'">
<template #icon>
<ReloadOutlined />
</template>

View File

@ -30,7 +30,13 @@
</a-alert>
<a-row justify="end">
<TableOperator class="smart-margin-bottom5 smart-margin-top5" v-model="columns" :tableId="TABLE_ID_CONST.SUPPORT.RELOAD" :refresh="ajaxQuery" />
<TableOperator
class="smart-margin-bottom5 smart-margin-top5"
v-model="columns"
:tableId="TABLE_ID_CONST.SUPPORT.RELOAD"
:refresh="ajaxQuery"
v-privilege="'support:reload:query'"
/>
</a-row>
<a-table
@ -46,7 +52,7 @@
<template #bodyCell="{ record, column }">
<template v-if="column.dataIndex === 'action'">
<div class="smart-table-operate">
<a-button @click="doReload(record.tag)" v-privilege="'support:reload:execute'" type="link"></a-button>
<a-button @click="doReload(record.tag)" v-privilege="'support:reload:update'" type="link"></a-button>
<a-button @click="showResultList(record.tag)" v-privilege="'support:reload:result'" type="link"></a-button>
</div>
</template>

View File

@ -8,7 +8,7 @@
-->
<template>
<a-modal :open="visible" title="reload结果列表" width="60%" :footer="null" @cancel="onClose">
<a-button type="primary" @click="ajaxQuery" size="small">
<a-button type="primary" @click="ajaxQuery" v-privilege="'support:reload:result'" size="small">
<template #icon>
<ReloadOutlined />
</template>

View File

@ -29,6 +29,7 @@
v-model="columns"
:tableId="TABLE_ID_CONST.SUPPORT.SERIAL_NUMBER"
:refresh="ajaxQuery"
v-privilege="'support:serialNumber:all'"
/>
</a-row>

View File

@ -13,7 +13,7 @@
<a-input-password class="form-item" v-model:value.trim="form.confirmPwd" type="password" placeholder="请输入确认密码" autocomplete="off" />
</a-form-item>
</a-form>
<a-button type="primary" style="margin: 20px 0 0 250px" @click="onSubmit"></a-button>
<a-button type="primary" v-privilege="'system:employee:password'" style="margin: 20px 0 0 250px" @click="onSubmit"></a-button>
</div>
</div>
</template>

View File

@ -7,13 +7,13 @@
<a-form-item class="smart-query-form-item smart-margin-left10">
<a-button-group>
<a-button v-privilege="'support:department:query'" type="primary" @click="onSearch">
<a-button v-privilege="'system:department:query'" type="primary" @click="onSearch">
<template #icon>
<SearchOutlined />
</template>
查询
</a-button>
<a-button v-privilege="'support:department:query'" @click="resetQuery">
<a-button v-privilege="'system:department:query'" @click="resetQuery">
<template #icon>
<ReloadOutlined />
</template>

View File

@ -18,7 +18,7 @@
</a-radio-group>
<a-input-search v-model:value.trim="params.keyword" placeholder="姓名/手机号/登录账号" @search="queryEmployeeByKeyword(true)">
<template #enterButton>
<a-button type="primary">
<a-button type="primary" v-privilege="'system:employee:query'">
<template #icon>
<SearchOutlined />
</template>
@ -26,7 +26,7 @@
</a-button>
</template>
</a-input-search>
<a-button @click="reset" class="smart-margin-left10">
<a-button @click="reset" v-privilege="'system:employee:query'" class="smart-margin-left10">
<template #icon>
<ReloadOutlined />
</template>

View File

@ -61,16 +61,8 @@
import { SmartLoading } from '/@/components/framework/smart-loading';
import { LOGIN_DEVICE_ENUM } from '/@/constants/system/login-device-const';
import { useUserStore } from '/@/store/modules/system/user';
import loginQR from '/@/assets/images/login/login-qr.png';
import leftBg2 from '/@/assets/images/login/left-bg2.png';
import loginGif from '/@/assets/images/login/login.gif';
import wechatIcon from '/@/assets/images/login/wechat-icon.png';
import aliIcon from '/@/assets/images/login/ali-icon.png';
import douyinIcon from '/@/assets/images/login/douyin-icon.png';
import qqIcon from '/@/assets/images/login/qq-icon.png';
import weiboIcon from '/@/assets/images/login/weibo-icon.png';
import feishuIcon from '/@/assets/images/login/feishu-icon.png';
import googleIcon from '/@/assets/images/login/google-icon.png';
import { buildRoutes } from '/@/router/index';
import { smartSentry } from '/@/lib/smart-sentry';
@ -87,6 +79,7 @@
password: '',
captchaCode: '',
captchaUuid: '',
emailCode: '',
loginDevice: LOGIN_DEVICE_ENUM.PC.value,
});
const rules = {

View File

@ -13,13 +13,13 @@
<a-input style="width: 200px" v-model:value="queryForm.keywords" placeholder="关键字查询" />
</a-form-item>
<a-form-item class="smart-query-form-item">
<a-button type="primary" @click="queryData">
<a-button type="primary" v-privilege="'system:position:query'" @click="queryData" >
<template #icon>
<SearchOutlined />
</template>
查询
</a-button>
<a-button @click="resetQuery" class="smart-margin-left10">
<a-button @click="resetQuery" v-privilege="'system:position:query'" class="smart-margin-left10">
<template #icon>
<ReloadOutlined />
</template>
@ -34,13 +34,13 @@
<!---------- 表格操作行 begin ----------->
<a-row class="smart-table-btn-block">
<div class="smart-table-operate-block">
<a-button @click="showForm" type="primary">
<a-button @click="showForm" v-privilege="'system:position:add'" type="primary">
<template #icon>
<PlusOutlined />
</template>
新建
</a-button>
<a-button @click="confirmBatchDelete" type="primary" danger :disabled="selectedRowKeyList.length === 0">
<a-button @click="confirmBatchDelete" v-privilege="'system:position:delete'" type="primary" danger :disabled="selectedRowKeyList.length === 0">
<template #icon>
<DeleteOutlined />
</template>
@ -67,8 +67,8 @@
<template #bodyCell="{ text, record, column }">
<template v-if="column.dataIndex === 'action'">
<div class="smart-table-operate">
<a-button @click="showForm(record)" type="link">编辑</a-button>
<a-button @click="onDelete(record)" danger type="link">删除</a-button>
<a-button @click="showForm(record)" v-privilege="'system:position:update'" type="link"></a-button>
<a-button @click="onDelete(record)" v-privilege="'system:position:delete'" danger type="link"></a-button>
</div>
</template>
</template>