补全功能模块的授权问题
parent
367886890f
commit
9c261a8f6a
|
|
@ -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/>
|
||||
|
|
|
|||
|
|
@ -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/>
|
||||
|
|
|
|||
|
|
@ -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/>
|
||||
|
|
|
|||
|
|
@ -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/>
|
||||
|
|
|
|||
|
|
@ -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/>
|
||||
|
|
|
|||
|
|
@ -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/>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -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>
|
||||
|
|
@ -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/>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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/>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -11,19 +11,23 @@
|
|||
<a-form class="smart-query-form">
|
||||
<a-row class="smart-query-form-row">
|
||||
<a-form-item label="关键字" class="smart-query-form-item">
|
||||
<a-input style="width: 300px" v-model:value="keywords" @change="search" placeholder="关键字" />
|
||||
<a-input style="width: 300px" v-model:value="keywords" @change="search" placeholder="关键字"/>
|
||||
</a-form-item>
|
||||
<a-form-item label="禁用" class="smart-query-form-item">
|
||||
<BooleanSelect v-model:value="disabledFlag" @change="search" style="width: 150px" />
|
||||
<BooleanSelect v-model:value="disabledFlag" @change="search" style="width: 150px"/>
|
||||
</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>
|
||||
|
|
@ -34,20 +38,20 @@
|
|||
<div class="smart-table-operate-block">
|
||||
<a-button @click="addOrUpdateData" type="primary" v-privilege="'support:dictData:add'">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
<PlusOutlined/>
|
||||
</template>
|
||||
新建
|
||||
</a-button>
|
||||
|
||||
<a-button
|
||||
@click="confirmBatchDelete"
|
||||
type="primary"
|
||||
danger
|
||||
:disabled="selectedRowKeyList.length === 0"
|
||||
v-privilege="'support:dictData:delete'"
|
||||
@click="confirmBatchDelete"
|
||||
type="primary"
|
||||
danger
|
||||
:disabled="selectedRowKeyList.length === 0"
|
||||
v-privilege="'support:dictData:delete'"
|
||||
>
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
<DeleteOutlined/>
|
||||
</template>
|
||||
批量删除
|
||||
</a-button>
|
||||
|
|
@ -56,21 +60,22 @@
|
|||
</a-row>
|
||||
|
||||
<a-table
|
||||
size="small"
|
||||
:dataSource="tableData"
|
||||
:columns="columns"
|
||||
rowKey="dictDataId"
|
||||
:pagination="false"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
|
||||
bordered
|
||||
size="small"
|
||||
:dataSource="tableData"
|
||||
:columns="columns"
|
||||
rowKey="dictDataId"
|
||||
:pagination="false"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
|
||||
bordered
|
||||
>
|
||||
<template #bodyCell="{ record, column }">
|
||||
<template v-if="column.dataIndex === 'disabledFlag'">
|
||||
<a-switch
|
||||
@change="(checked) => handleChangeDisabled(checked, record)"
|
||||
v-model:checked="record.enabled"
|
||||
checked-children="启用中"
|
||||
un-checked-children="已禁用"
|
||||
v-privilege="'support:dictData:updateDisabled'"
|
||||
@change="(checked) => handleChangeDisabled(checked, record)"
|
||||
v-model:checked="record.enabled"
|
||||
checked-children="启用中"
|
||||
un-checked-children="已禁用"
|
||||
/>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'action'">
|
||||
|
|
@ -80,173 +85,175 @@
|
|||
</a-table>
|
||||
|
||||
<div class="smart-query-table-page">共计 {{ tableData.length }} 条</div>
|
||||
<DictDataFormModal ref="dictDataFormModalRef" @reloadList="queryData" />
|
||||
<DictDataFormModal ref="dictDataFormModalRef" @reloadList="queryData"/>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref } from 'vue';
|
||||
import DictDataFormModal from './dict-data-form-modal.vue';
|
||||
import { dictApi } from '/@/api/support/dict-api';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import BooleanSelect from '/@/components/framework/boolean-select/index.vue';
|
||||
import _ from 'lodash';
|
||||
import {reactive, ref} from 'vue';
|
||||
import DictDataFormModal from './dict-data-form-modal.vue';
|
||||
import {dictApi} from '/@/api/support/dict-api';
|
||||
import {SmartLoading} from '/@/components/framework/smart-loading';
|
||||
import {Modal} from 'ant-design-vue';
|
||||
import {message} from 'ant-design-vue';
|
||||
import {smartSentry} from '/@/lib/smart-sentry';
|
||||
import BooleanSelect from '/@/components/framework/boolean-select/index.vue';
|
||||
import _ from 'lodash';
|
||||
|
||||
// 是否展示抽屉
|
||||
const visible = ref(false);
|
||||
const dictId = ref(undefined);
|
||||
const dictCode = ref(undefined);
|
||||
// 是否展示抽屉
|
||||
const visible = ref(false);
|
||||
const dictId = ref(undefined);
|
||||
const dictCode = ref(undefined);
|
||||
|
||||
function showModal(id, code) {
|
||||
dictId.value = id;
|
||||
dictCode.value = code;
|
||||
visible.value = true;
|
||||
queryData();
|
||||
}
|
||||
function showModal(id, code) {
|
||||
dictId.value = id;
|
||||
dictCode.value = code;
|
||||
visible.value = true;
|
||||
queryData();
|
||||
}
|
||||
|
||||
function onClose() {
|
||||
visible.value = false;
|
||||
dictId.value = undefined;
|
||||
dictCode.value = undefined;
|
||||
}
|
||||
function onClose() {
|
||||
visible.value = false;
|
||||
dictId.value = undefined;
|
||||
dictCode.value = undefined;
|
||||
}
|
||||
|
||||
const columns = reactive([
|
||||
{
|
||||
title: '值',
|
||||
dataIndex: 'dataValue',
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
dataIndex: 'dataLabel',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
width: 90,
|
||||
dataIndex: 'disabledFlag',
|
||||
},
|
||||
{
|
||||
title: '排序',
|
||||
width: 50,
|
||||
dataIndex: 'sortOrder',
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
width: 200,
|
||||
ellipsis: true,
|
||||
dataIndex: 'remark',
|
||||
},
|
||||
{
|
||||
title: '更新时间',
|
||||
width: 150,
|
||||
dataIndex: 'updateTime',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: 70,
|
||||
dataIndex: 'action',
|
||||
},
|
||||
]);
|
||||
const columns = reactive([
|
||||
{
|
||||
title: '值',
|
||||
dataIndex: 'dataValue',
|
||||
},
|
||||
{
|
||||
title: '名称',
|
||||
dataIndex: 'dataLabel',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
width: 90,
|
||||
dataIndex: 'disabledFlag',
|
||||
},
|
||||
{
|
||||
title: '排序',
|
||||
width: 50,
|
||||
dataIndex: 'sortOrder',
|
||||
},
|
||||
{
|
||||
title: '备注',
|
||||
width: 200,
|
||||
ellipsis: true,
|
||||
dataIndex: 'remark',
|
||||
},
|
||||
{
|
||||
title: '更新时间',
|
||||
width: 150,
|
||||
dataIndex: 'updateTime',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: 70,
|
||||
dataIndex: 'action',
|
||||
},
|
||||
]);
|
||||
|
||||
// ----------------------- 表格 查询 ------------------------
|
||||
const keywords = ref(undefined);
|
||||
const disabledFlag = ref(null);
|
||||
// ----------------------- 表格 查询 ------------------------
|
||||
const keywords = ref(undefined);
|
||||
const disabledFlag = ref(null);
|
||||
|
||||
const selectedRowKeyList = ref([]);
|
||||
const tableLoading = ref(false);
|
||||
const dictDataList = ref([]);
|
||||
const tableData = ref([]);
|
||||
const selectedRowKeyList = ref([]);
|
||||
const tableLoading = ref(false);
|
||||
const dictDataList = ref([]);
|
||||
const tableData = ref([]);
|
||||
|
||||
function onSelectChange(selectedRowKeys) {
|
||||
selectedRowKeyList.value = selectedRowKeys;
|
||||
}
|
||||
function onSelectChange(selectedRowKeys) {
|
||||
selectedRowKeyList.value = selectedRowKeys;
|
||||
}
|
||||
|
||||
function search() {
|
||||
tableData.value = dictDataList.value.filter((item) => {
|
||||
let keywordsFilterFlag = true;
|
||||
if (keywords.value) {
|
||||
keywordsFilterFlag =
|
||||
function search() {
|
||||
tableData.value = dictDataList.value.filter((item) => {
|
||||
let keywordsFilterFlag = true;
|
||||
if (keywords.value) {
|
||||
keywordsFilterFlag =
|
||||
_.includes(item.dataValue.toLowerCase(), keywords.value.toLowerCase()) ||
|
||||
_.includes(item.dataLabel.toLowerCase(), keywords.value.toLowerCase()) ||
|
||||
_.includes(item.remark.toLowerCase(), keywords.value.toLowerCase());
|
||||
}
|
||||
let disabledFilterFlag = _.isNull(disabledFlag.value) ? true : item.disabledFlag === disabledFlag.value;
|
||||
return disabledFilterFlag && keywordsFilterFlag;
|
||||
});
|
||||
}
|
||||
|
||||
function resetQuery() {
|
||||
keywords.value = null;
|
||||
disabledFlag.value = null;
|
||||
queryData();
|
||||
}
|
||||
|
||||
async function queryData() {
|
||||
try {
|
||||
tableLoading.value = true;
|
||||
let responseData = await dictApi.queryDictData(dictId.value);
|
||||
responseData.data.map((e) => (e.enabled = !e.disabledFlag));
|
||||
dictDataList.value = responseData.data;
|
||||
search();
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
tableLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------- 启用/禁用 ------------------------
|
||||
async function handleChangeDisabled(disabledFlag, dictData) {
|
||||
SmartLoading.show();
|
||||
try {
|
||||
await dictApi.updateDictDataDisabled(dictData.dictDataId);
|
||||
dictData.disabledFlag = !disabledFlag;
|
||||
message.success('操作成功');
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------- 批量 删除 ------------------------
|
||||
|
||||
function confirmBatchDelete() {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: '确定要删除选中值吗?',
|
||||
okText: '删除',
|
||||
okType: 'danger',
|
||||
onOk() {
|
||||
batchDelete();
|
||||
},
|
||||
cancelText: '取消',
|
||||
onCancel() {},
|
||||
});
|
||||
}
|
||||
|
||||
async function batchDelete() {
|
||||
try {
|
||||
SmartLoading.show();
|
||||
await dictApi.batchDeleteDictData(selectedRowKeyList.value);
|
||||
message.success('删除成功');
|
||||
await queryData();
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------- 弹窗表单操作 ------------------------
|
||||
|
||||
const dictDataFormModalRef = ref();
|
||||
function addOrUpdateData(rowData) {
|
||||
dictDataFormModalRef.value.showModal(rowData, dictId.value, dictCode.value);
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
showModal,
|
||||
let disabledFilterFlag = _.isNull(disabledFlag.value) ? true : item.disabledFlag === disabledFlag.value;
|
||||
return disabledFilterFlag && keywordsFilterFlag;
|
||||
});
|
||||
}
|
||||
|
||||
function resetQuery() {
|
||||
keywords.value = null;
|
||||
disabledFlag.value = null;
|
||||
queryData();
|
||||
}
|
||||
|
||||
async function queryData() {
|
||||
try {
|
||||
tableLoading.value = true;
|
||||
let responseData = await dictApi.queryDictData(dictId.value);
|
||||
responseData.data.map((e) => (e.enabled = !e.disabledFlag));
|
||||
dictDataList.value = responseData.data;
|
||||
search();
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
tableLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------- 启用/禁用 ------------------------
|
||||
async function handleChangeDisabled(disabledFlag, dictData) {
|
||||
SmartLoading.show();
|
||||
try {
|
||||
await dictApi.updateDictDataDisabled(dictData.dictDataId);
|
||||
dictData.disabledFlag = !disabledFlag;
|
||||
message.success('操作成功');
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------- 批量 删除 ------------------------
|
||||
|
||||
function confirmBatchDelete() {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: '确定要删除选中值吗?',
|
||||
okText: '删除',
|
||||
okType: 'danger',
|
||||
onOk() {
|
||||
batchDelete();
|
||||
},
|
||||
cancelText: '取消',
|
||||
onCancel() {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function batchDelete() {
|
||||
try {
|
||||
SmartLoading.show();
|
||||
await dictApi.batchDeleteDictData(selectedRowKeyList.value);
|
||||
message.success('删除成功');
|
||||
await queryData();
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------- 弹窗表单操作 ------------------------
|
||||
|
||||
const dictDataFormModalRef = ref();
|
||||
|
||||
function addOrUpdateData(rowData) {
|
||||
dictDataFormModalRef.value.showModal(rowData, dictId.value, dictCode.value);
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
showModal,
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -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="启用中"
|
||||
|
|
|
|||
|
|
@ -7,37 +7,39 @@
|
|||
-->
|
||||
<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="文件名" />
|
||||
<a-input style="width: 150px" v-model:value="queryForm.fileName" placeholder="文件名"/>
|
||||
</a-form-item>
|
||||
<a-form-item label="文件Key" class="smart-query-form-item">
|
||||
<a-input style="width: 150px" v-model:value="queryForm.fileKey" placeholder="文件Key" />
|
||||
<a-input style="width: 150px" v-model:value="queryForm.fileKey" placeholder="文件Key"/>
|
||||
</a-form-item>
|
||||
<a-form-item label="文件类型" class="smart-query-form-item">
|
||||
<a-input style="width: 150px" v-model:value="queryForm.fileType" placeholder="文件类型" />
|
||||
<a-input style="width: 150px" v-model:value="queryForm.fileType" placeholder="文件类型"/>
|
||||
</a-form-item>
|
||||
<a-form-item label="创建人" class="smart-query-form-item">
|
||||
<a-input style="width: 150px" v-model:value="queryForm.creatorName" placeholder="创建人" />
|
||||
<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 />
|
||||
<SearchOutlined/>
|
||||
</template>
|
||||
查询
|
||||
</a-button>
|
||||
<a-button @click="resetQuery">
|
||||
<a-button @click="resetQuery" v-privilege="'support:file:query'">
|
||||
<template #icon>
|
||||
<ReloadOutlined />
|
||||
<ReloadOutlined/>
|
||||
</template>
|
||||
重置
|
||||
</a-button>
|
||||
|
|
@ -53,27 +55,27 @@
|
|||
<div class="smart-table-operate-block">
|
||||
<a-button type="primary" @click="showUploadModal">
|
||||
<template #icon>
|
||||
<cloud-upload-outlined />
|
||||
<cloud-upload-outlined/>
|
||||
</template>
|
||||
上传文件
|
||||
</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"/>
|
||||
</div>
|
||||
</a-row>
|
||||
<!---------- 表格操作行 end ----------->
|
||||
|
||||
<!---------- 表格 begin ----------->
|
||||
<a-table
|
||||
size="small"
|
||||
:scroll="{ x: 1300 }"
|
||||
:dataSource="tableData"
|
||||
:columns="columns"
|
||||
rowKey="fileId"
|
||||
bordered
|
||||
:loading="tableLoading"
|
||||
:pagination="false"
|
||||
size="small"
|
||||
:scroll="{ x: 1300 }"
|
||||
:dataSource="tableData"
|
||||
:columns="columns"
|
||||
rowKey="fileId"
|
||||
bordered
|
||||
:loading="tableLoading"
|
||||
:pagination="false"
|
||||
>
|
||||
<template #bodyCell="{ text, record, column }">
|
||||
<template v-if="column.dataIndex === 'folderType'">
|
||||
|
|
@ -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>
|
||||
|
|
@ -94,199 +96,201 @@
|
|||
|
||||
<div class="smart-query-table-page">
|
||||
<a-pagination
|
||||
showSizeChanger
|
||||
showQuickJumper
|
||||
show-less-items
|
||||
:pageSizeOptions="PAGE_SIZE_OPTIONS"
|
||||
:defaultPageSize="queryForm.pageSize"
|
||||
v-model:current="queryForm.pageNum"
|
||||
v-model:pageSize="queryForm.pageSize"
|
||||
:total="total"
|
||||
@change="queryData"
|
||||
@showSizeChange="queryData"
|
||||
:show-total="(total) => `共${total}条`"
|
||||
showSizeChanger
|
||||
showQuickJumper
|
||||
show-less-items
|
||||
:pageSizeOptions="PAGE_SIZE_OPTIONS"
|
||||
:defaultPageSize="queryForm.pageSize"
|
||||
v-model:current="queryForm.pageNum"
|
||||
v-model:pageSize="queryForm.pageSize"
|
||||
:total="total"
|
||||
@change="queryData"
|
||||
@showSizeChange="queryData"
|
||||
:show-total="(total) => `共${total}条`"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<FilePreviewModal ref="filePreviewModalRef" />
|
||||
<FilePreviewModal ref="filePreviewModalRef"/>
|
||||
|
||||
<a-modal v-model:open="uploadModalFlag" title="上传文件" @onCancel="hideUploadModal" @ok="hideUploadModal">
|
||||
<FileUpload
|
||||
list-type="text"
|
||||
:maxUploadSize="5"
|
||||
buttonText="点击上传文件"
|
||||
:defaultFileList="[]"
|
||||
:multiple="true"
|
||||
:folder="FILE_FOLDER_TYPE_ENUM.COMMON.value"
|
||||
v-privilege="'support:file:upload'"
|
||||
list-type="text"
|
||||
:maxUploadSize="5"
|
||||
buttonText="点击上传文件"
|
||||
:defaultFileList="[]"
|
||||
:multiple="true"
|
||||
:folder="FILE_FOLDER_TYPE_ENUM.COMMON.value"
|
||||
/>
|
||||
</a-modal>
|
||||
</a-card>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { fileApi } from '/@/api/support/file-api';
|
||||
import SmartEnumSelect from '/@/components/framework/smart-enum-select/index.vue';
|
||||
import TableOperator from '/@/components/support/table-operator/index.vue';
|
||||
import { PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
|
||||
import { defaultTimeRanges } from '/@/lib/default-time-ranges';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import FilePreviewModal from '/@/components/support/file-preview-modal/index.vue';
|
||||
import FileUpload from '/@/components/support/file-upload/index.vue';
|
||||
import { FILE_FOLDER_TYPE_ENUM } from '/@/constants/support/file-const';
|
||||
// ---------------------------- 表格列 ----------------------------
|
||||
import {onMounted, reactive, ref} from 'vue';
|
||||
import {fileApi} from '/@/api/support/file-api';
|
||||
import SmartEnumSelect from '/@/components/framework/smart-enum-select/index.vue';
|
||||
import TableOperator from '/@/components/support/table-operator/index.vue';
|
||||
import {PAGE_SIZE_OPTIONS} from '/@/constants/common-const';
|
||||
import {defaultTimeRanges} from '/@/lib/default-time-ranges';
|
||||
import {smartSentry} from '/@/lib/smart-sentry';
|
||||
import FilePreviewModal from '/@/components/support/file-preview-modal/index.vue';
|
||||
import FileUpload from '/@/components/support/file-upload/index.vue';
|
||||
import {FILE_FOLDER_TYPE_ENUM} from '/@/constants/support/file-const';
|
||||
// ---------------------------- 表格列 ----------------------------
|
||||
|
||||
const columns = ref([
|
||||
{
|
||||
title: '主键ID',
|
||||
dataIndex: 'fileId',
|
||||
ellipsis: true,
|
||||
width: 70,
|
||||
},
|
||||
{
|
||||
title: '文件夹',
|
||||
dataIndex: 'folderType',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '文件名称',
|
||||
dataIndex: 'fileName',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '文件大小',
|
||||
dataIndex: 'fileSize',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '文件类型',
|
||||
dataIndex: 'fileType',
|
||||
ellipsis: true,
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '上传人',
|
||||
dataIndex: 'creatorName',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '人类型',
|
||||
dataIndex: 'creatorUserType',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '上传时间',
|
||||
dataIndex: 'createTime',
|
||||
ellipsis: true,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
]);
|
||||
const columns = ref([
|
||||
{
|
||||
title: '主键ID',
|
||||
dataIndex: 'fileId',
|
||||
ellipsis: true,
|
||||
width: 70,
|
||||
},
|
||||
{
|
||||
title: '文件夹',
|
||||
dataIndex: 'folderType',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '文件名称',
|
||||
dataIndex: 'fileName',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '文件大小',
|
||||
dataIndex: 'fileSize',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '文件类型',
|
||||
dataIndex: 'fileType',
|
||||
ellipsis: true,
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '上传人',
|
||||
dataIndex: 'creatorName',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '人类型',
|
||||
dataIndex: 'creatorUserType',
|
||||
ellipsis: true,
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '上传时间',
|
||||
dataIndex: 'createTime',
|
||||
ellipsis: true,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
]);
|
||||
|
||||
// ---------------------------- 查询数据表单和方法 ----------------------------
|
||||
// ---------------------------- 查询数据表单和方法 ----------------------------
|
||||
|
||||
const queryFormState = {
|
||||
folderType: undefined, //文件夹类型
|
||||
fileName: undefined, //文件名词
|
||||
fileKey: undefined, //文件Key
|
||||
fileType: undefined, //文件类型
|
||||
creatorName: undefined, //创建人
|
||||
createTime: [], //创建时间
|
||||
createTimeBegin: undefined, //创建时间 开始
|
||||
createTimeEnd: undefined, //创建时间 结束
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
// 查询表单form
|
||||
const queryForm = reactive({ ...queryFormState });
|
||||
// 表格加载loading
|
||||
const tableLoading = ref(false);
|
||||
// 表格数据
|
||||
const tableData = ref([]);
|
||||
// 总数
|
||||
const total = ref(0);
|
||||
const queryFormState = {
|
||||
folderType: undefined, //文件夹类型
|
||||
fileName: undefined, //文件名词
|
||||
fileKey: undefined, //文件Key
|
||||
fileType: undefined, //文件类型
|
||||
creatorName: undefined, //创建人
|
||||
createTime: [], //创建时间
|
||||
createTimeBegin: undefined, //创建时间 开始
|
||||
createTimeEnd: undefined, //创建时间 结束
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
// 查询表单form
|
||||
const queryForm = reactive({...queryFormState});
|
||||
// 表格加载loading
|
||||
const tableLoading = ref(false);
|
||||
// 表格数据
|
||||
const tableData = ref([]);
|
||||
// 总数
|
||||
const total = ref(0);
|
||||
|
||||
// 重置查询条件
|
||||
function resetQuery() {
|
||||
let pageSize = queryForm.pageSize;
|
||||
Object.assign(queryForm, queryFormState);
|
||||
queryForm.pageSize = pageSize;
|
||||
queryData();
|
||||
}
|
||||
// 重置查询条件
|
||||
function resetQuery() {
|
||||
let pageSize = queryForm.pageSize;
|
||||
Object.assign(queryForm, queryFormState);
|
||||
queryForm.pageSize = pageSize;
|
||||
queryData();
|
||||
}
|
||||
|
||||
// 查询数据
|
||||
// 查询数据
|
||||
|
||||
function onSearch() {
|
||||
queryForm.pageNum = 1;
|
||||
queryData();
|
||||
}
|
||||
function onSearch() {
|
||||
queryForm.pageNum = 1;
|
||||
queryData();
|
||||
}
|
||||
|
||||
async function queryData() {
|
||||
tableLoading.value = true;
|
||||
try {
|
||||
let queryResult = await fileApi.queryPage(queryForm);
|
||||
for (const file of queryResult.data.list) {
|
||||
file.fileSize = getFileSize(file.fileSize);
|
||||
}
|
||||
tableData.value = queryResult.data.list;
|
||||
total.value = queryResult.data.total;
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
tableLoading.value = false;
|
||||
async function queryData() {
|
||||
tableLoading.value = true;
|
||||
try {
|
||||
let queryResult = await fileApi.queryPage(queryForm);
|
||||
for (const file of queryResult.data.list) {
|
||||
file.fileSize = getFileSize(file.fileSize);
|
||||
}
|
||||
tableData.value = queryResult.data.list;
|
||||
total.value = queryResult.data.total;
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
tableLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
function onChangeCreateTime(dates, dateStrings) {
|
||||
queryForm.createTimeBegin = dateStrings[0];
|
||||
queryForm.createTimeEnd = dateStrings[1];
|
||||
function onChangeCreateTime(dates, dateStrings) {
|
||||
queryForm.createTimeBegin = dateStrings[0];
|
||||
queryForm.createTimeEnd = dateStrings[1];
|
||||
}
|
||||
|
||||
function getFileSize(size) {
|
||||
//把字节转换成正常文件大小
|
||||
if (!size) return '';
|
||||
var num = 1024.0; //byte
|
||||
if (size < num) return size + 'B';
|
||||
if (size < Math.pow(num, 2)) return (size / num).toFixed(2) + 'KB'; //kb
|
||||
if (size < Math.pow(num, 3)) return (size / Math.pow(num, 2)).toFixed(2) + 'MB'; //M
|
||||
if (size < Math.pow(num, 4)) return (size / Math.pow(num, 3)).toFixed(2) + 'G'; //G
|
||||
return (size / Math.pow(num, 4)).toFixed(2) + 'T'; //T
|
||||
}
|
||||
|
||||
// 查看文件
|
||||
const filePreviewModalRef = ref();
|
||||
|
||||
function view(file) {
|
||||
filePreviewModalRef.value.showPreview(file);
|
||||
}
|
||||
|
||||
// 下载文件
|
||||
async function download(file) {
|
||||
try {
|
||||
await fileApi.downLoadFile(file.fileKey);
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
}
|
||||
}
|
||||
|
||||
function getFileSize(size) {
|
||||
//把字节转换成正常文件大小
|
||||
if (!size) return '';
|
||||
var num = 1024.0; //byte
|
||||
if (size < num) return size + 'B';
|
||||
if (size < Math.pow(num, 2)) return (size / num).toFixed(2) + 'KB'; //kb
|
||||
if (size < Math.pow(num, 3)) return (size / Math.pow(num, 2)).toFixed(2) + 'MB'; //M
|
||||
if (size < Math.pow(num, 4)) return (size / Math.pow(num, 3)).toFixed(2) + 'G'; //G
|
||||
return (size / Math.pow(num, 4)).toFixed(2) + 'T'; //T
|
||||
}
|
||||
onMounted(queryData);
|
||||
|
||||
// 查看文件
|
||||
const filePreviewModalRef = ref();
|
||||
function view(file) {
|
||||
filePreviewModalRef.value.showPreview(file);
|
||||
}
|
||||
// ------------- 上传文件 --------------------
|
||||
const uploadModalFlag = ref(false);
|
||||
|
||||
// 下载文件
|
||||
async function download(file) {
|
||||
try {
|
||||
await fileApi.downLoadFile(file.fileKey);
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
}
|
||||
}
|
||||
function showUploadModal() {
|
||||
uploadModalFlag.value = true;
|
||||
}
|
||||
|
||||
onMounted(queryData);
|
||||
|
||||
// ------------- 上传文件 --------------------
|
||||
const uploadModalFlag = ref(false);
|
||||
|
||||
function showUploadModal() {
|
||||
uploadModalFlag.value = true;
|
||||
}
|
||||
|
||||
function hideUploadModal() {
|
||||
uploadModalFlag.value = false;
|
||||
queryData();
|
||||
}
|
||||
function hideUploadModal() {
|
||||
uploadModalFlag.value = false;
|
||||
queryData();
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
</a-row>
|
||||
</a-form>
|
||||
<a-row justify="end">
|
||||
<TableOperator class="smart-margin-bottom5" v-model="columns" :tableId="TABLE_ID_CONST.SUPPORT.HEART_BEAT" :refresh="ajaxQuery" />
|
||||
<TableOperator class="smart-margin-bottom5" v-model="columns" :tableId="TABLE_ID_CONST.SUPPORT.HEART_BEAT" :refresh="ajaxQuery" />
|
||||
</a-row>
|
||||
<a-table
|
||||
size="small"
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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 ----------->
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
v-model="columns"
|
||||
:tableId="TABLE_ID_CONST.SUPPORT.SERIAL_NUMBER"
|
||||
:refresh="ajaxQuery"
|
||||
v-privilege="'support:serialNumber:all'"
|
||||
/>
|
||||
</a-row>
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue