--修正后的小屏按钮挤兑问题

This commit is contained in:
lai
2023-12-12 14:55:07 +08:00
parent 63e3f352b2
commit f845f3f4de
15 changed files with 699 additions and 437 deletions

View File

@@ -99,7 +99,7 @@ body .ant-pro-basicLayout {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
align-items: center;
align-items: left;
}
.button-container > button {
@@ -115,7 +115,7 @@ body .ant-pro-basicLayout {
.button-container {
flex-direction: row;
align-items: flex-start;
align-items: center;
align-items: left;
}
.button-container > button {
margin-right: 12px;
@@ -127,7 +127,7 @@ body .ant-pro-basicLayout {
.button-container {
flex-direction: column;
align-items: flex-start;
align-items: center;
align-items: left;
}
.button-container > button {
margin-right: 0px;

View File

@@ -22,7 +22,7 @@ import { writeSheet } from '@/utils/execl-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { readLoalXlsx } from '@/utils/execl-utils';
const { getDict } = useDictStore();
const { t,currentLocale } = useI18n();
const { t, currentLocale } = useI18n();
/**字典数据 */
let dict: {
@@ -233,9 +233,6 @@ let tableColumns: ColumnsType = [
},
];
/**帮助文档表格字段列 */
let alarmTableColumns: ColumnsType = [
{
@@ -252,7 +249,7 @@ let alarmTableColumns: ColumnsType = [
},
{
title: t('views.faultManage.activeAlarm.addInfo'),
dataIndex:'helpInfo',
dataIndex: 'helpInfo',
align: 'center',
width: 8,
},
@@ -294,7 +291,7 @@ let alarmTableColumns: ColumnsType = [
},
{
title: t('views.faultManage.activeAlarm.objectNf'),
dataIndex:'objNf',
dataIndex: 'objNf',
align: 'center',
width: 2,
},
@@ -416,14 +413,12 @@ function fnModalVisibleByVive(row: Record<string, any>) {
modalState.visibleByView = true;
}
/** 告警帮助文档详细信息 */
function fnModalVisibleBy(code: string) {
modalState.helpShowView = false;
const lang=currentLocale.value.split('_')[0];
modalState.title=t('views.faultManage.activeAlarm.helpFile');
readLoalXlsx(lang,code)
const lang = currentLocale.value.split('_')[0];
modalState.title = t('views.faultManage.activeAlarm.helpFile');
readLoalXlsx(lang, code)
.then(res => {
alarmTableState.data = res;
modalState.helpShowView = true;
@@ -438,7 +433,7 @@ function fnModalVisibleBy(code: string) {
function fnModalOk() {
modalState.confirmLoading = true;
const from = toRaw(modalState.from);
if (from.ackState==="1") {
if (from.ackState === '1') {
message.error({
content: t('views.faultManage.activeAlarm.ackError'),
duration: 3,
@@ -661,7 +656,7 @@ function fnModalCancel() {
modalState.visibleByEdit = false;
modalState.visibleByView = false;
modalState.visibleByShowSet = false;
modalState.helpShowView=false;
modalState.helpShowView = false;
}
/**查询列表, pageNum初始页数 */
@@ -850,12 +845,9 @@ onMounted(() => {
<a-card :bordered="false" :body-style="{ padding: '0px' }">
<!-- 插槽-卡片左侧侧 -->
<template #title>
<a-space :size="8" align="center">
<div class="button-container">
<a-button
type="primary"
class="primary-button"
@click.prevent="fnCancelConfirm()"
:disabled="state.selectedRowKeys.length <= 0"
>
@@ -865,7 +857,7 @@ onMounted(() => {
{{ t('views.faultManage.activeAlarm.updateConfirm') }}
</a-button>
<a-button type="primary" class="primary-button" @click.prevent="fnSync()">
<a-button type="primary" @click.prevent="fnSync()">
<template #icon>
<ReloadOutlined />
</template>
@@ -875,7 +867,6 @@ onMounted(() => {
<a-button
type="primary"
danger
class="danger-button"
@click.prevent="fnClear()"
:disabled="state.selectedRowKeys.length !== 1"
>
@@ -885,22 +876,21 @@ onMounted(() => {
{{ t('views.faultManage.activeAlarm.clear') }}
</a-button>
<a-button type="primary" class="primary-button" @click.prevent="fnShowSet()">
<a-button type="primary" @click.prevent="fnShowSet()">
<template #icon> <SettingOutlined /> </template>
{{ t('views.faultManage.activeAlarm.disPlayFilfter') }}
</a-button>
<a-button type="primary" class="primary-button" @click.prevent="fnExportAll()">
<a-button type="primary" @click.prevent="fnExportAll()">
<template #icon> <export-outlined /> </template>
{{ t('views.faultManage.activeAlarm.exportAll') }}
</a-button>
</div>
</a-space>
</template>
<!-- 插槽-卡片右侧 -->
<template #extra>
<a-space :size="8" align="center">
<div class="button-container">
<a-tooltip>
<template #title>{{ t('common.searchBarText') }}</template>
<a-switch
@@ -940,7 +930,7 @@ onMounted(() => {
</template>
</a-dropdown>
</a-tooltip>
</a-space>
</div>
</template>
<!-- 表格列表 -->
@@ -1011,7 +1001,6 @@ onMounted(() => {
</a-table>
</a-card>
<!-- 帮助文档 -->
<a-modal
width="100%"

View File

@@ -645,12 +645,9 @@ onMounted(() => {
<a-card :bordered="false" :body-style="{ padding: '0px' }">
<!-- 插槽-卡片左侧侧 -->
<template #title>
<a-space :size="8" align="center">
<div class="button-container">
<a-button
type="primary"
class="primary-button"
@click.prevent="fnModalVisibleByEdit()"
v-perms:has="['monitor:job:add']"
>
@@ -660,7 +657,6 @@ onMounted(() => {
<a-button
type="default"
danger
class="danger-button"
:disabled="tableState.selectedRowKeys.length <= 0"
@click.prevent="fnRecordDelete()"
v-perms:has="['monitor:job:remove']"
@@ -670,7 +666,6 @@ onMounted(() => {
</a-button>
<a-button
type="dashed"
class="dashed-button"
@click.prevent="fnExportList()"
v-perms:has="['monitor:job:export']"
>
@@ -679,7 +674,6 @@ onMounted(() => {
</a-button>
<a-button
type="default"
class="dashed-button"
@click.prevent="fnJobLogView()"
v-perms:has="['monitor:job:query']"
>
@@ -689,7 +683,6 @@ onMounted(() => {
<a-button
type="dashed"
danger
class="dashed-button"
@click.prevent="fnResetQueueJob"
v-perms:has="['monitor:job:remove']"
>
@@ -697,12 +690,11 @@ onMounted(() => {
{{ t('views.monitor.job.resetQueue') }}
</a-button>
</div>
</a-space>
</template>
<!-- 插槽-卡片右侧 -->
<template #extra>
<a-space :size="8" align="center">
<div class="button-container">
<a-tooltip>
<template #title>{{ t('common.searchBarText') }}</template>
<a-switch
@@ -751,7 +743,7 @@ onMounted(() => {
</template>
</a-dropdown>
</a-tooltip>
</a-space>
</div>
</template>
<!-- 表格列表 -->
@@ -874,7 +866,8 @@ onMounted(() => {
<a-col :lg="12" :md="12" :xs="24">
<a-form-item :label="t('views.monitor.job.status')" name="status">
{{
dict.sysJobStatus.find(s => s.value === modalState.from.status)?.label
dict.sysJobStatus.find(s => s.value === modalState.from.status)
?.label
}}
</a-form-item>
</a-col>

View File

@@ -491,20 +491,14 @@ onMounted(() => {
<a-card :bordered="false" :body-style="{ padding: '0px' }">
<!-- 插槽-卡片左侧侧 -->
<template #title>
<a-space :size="8" align="center">
<div class="button-container">
<a-button
type="default"
class="primary-button"
@click.prevent="fnClose()"
>
<a-button type="default" @click.prevent="fnClose()">
<template #icon><CloseOutlined /></template>
{{ t('common.close') }}
</a-button>
<a-button
type="default"
danger
class="danger-button"
:disabled="tableState.selectedRowKeys.length <= 0"
@click.prevent="fnRecordDelete()"
v-perms:has="['monitor:job:remove']"
@@ -515,7 +509,6 @@ onMounted(() => {
<a-button
type="dashed"
danger
class="danger-button"
@click.prevent="fnCleanList()"
v-perms:has="['monitor:job:remove']"
>
@@ -524,7 +517,6 @@ onMounted(() => {
</a-button>
<a-button
type="dashed"
class="dashed-button"
@click.prevent="fnExportList()"
v-perms:has="['monitor:job:export']"
>
@@ -532,12 +524,11 @@ onMounted(() => {
{{ t('common.export') }}
</a-button>
</div>
</a-space>
</template>
<!-- 插槽-卡片右侧 -->
<template #extra>
<a-space :size="8" align="center">
<div class="button-container">
<a-tooltip>
<template #title>{{ t('common.searchBarText') }}</template>
<a-switch
@@ -586,7 +577,7 @@ onMounted(() => {
</template>
</a-dropdown>
</a-tooltip>
</a-space>
</div>
</template>
<!-- 表格列表 -->

View File

@@ -728,16 +728,15 @@ onMounted(() => {
<a-card :bordered="false" :body-style="{ padding: '0px' }">
<!-- 插槽-卡片左侧侧 -->
<template #title>
<a-space :size="8" align="center">
<div class="button-container">
<a-button type="primary" class="primary-button" @click.prevent="fnModalVisibleByEdit()">
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()">
<template #icon>
<PlusOutlined />
</template>
{{ t('common.addText') }}
</a-button>
<a-button type="primary" class="primary-button" @click.prevent="fnModalVisibleByBatch(1)">
<a-button type="primary" @click.prevent="fnModalVisibleByBatch(1)">
<template #icon>
<PlusOutlined />
</template>
@@ -746,7 +745,6 @@ onMounted(() => {
<a-button
type="primary"
danger
class="danger-button"
ghost
@click.prevent="fnModalVisibleByBatch(0)"
>
@@ -765,7 +763,6 @@ onMounted(() => {
<a-button
type="dashed"
danger
class="dashed-button"
:disabled="modalState.loadDataLoading"
:loading="modalState.loadDataLoading"
>
@@ -774,7 +771,7 @@ onMounted(() => {
</a-button>
</a-popconfirm>
<a-button class="dashed-button" type="dashed" @click.prevent="fnModalUploadImportOpen">
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen">
<template #icon><ImportOutlined /></template>
{{ t('views.neUser.auth.import') }}
</a-button>
@@ -788,18 +785,17 @@ onMounted(() => {
cancel-text="CSV"
@cancel="fnExportList('csv')"
>
<a-button class="dashed-button" type="dashed">
<a-button type="dashed">
<template #icon><ExportOutlined /></template>
{{ t('views.neUser.auth.export') }}
</a-button>
</a-popconfirm>
</div>
</a-space>
</template>
<!-- 插槽-卡片右侧 -->
<template #extra>
<a-space :size="8" align="center">
<div class="button-container">
<a-tooltip>
<template #title>{{ t('common.searchBarText') }}</template>
<a-switch
@@ -852,7 +848,7 @@ onMounted(() => {
</template>
</a-dropdown>
</a-tooltip>
</a-space>
</div>
</template>
<!-- 表格列表 -->

View File

@@ -567,9 +567,8 @@ onMounted(() => {
<a-card :bordered="false" :body-style="{ padding: '0px' }">
<!-- 插槽-卡片左侧侧 -->
<template #title>
<a-space :size="8" align="center">
<div class="button-container">
<a-button type="primary" class="primary-button" @click.prevent="fnModalVisibleByEdit()">
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()">
<template #icon>
<PlusOutlined />
</template>
@@ -579,7 +578,6 @@ onMounted(() => {
<a-button
type="primary"
ghost
class="primary-button"
@click.prevent="fnModalVisibleByBatch('add')"
>
<template #icon>
@@ -590,7 +588,6 @@ onMounted(() => {
<a-button
type="primary"
ghost
class="primary-button"
@click.prevent="fnModalVisibleByBatch('update')"
>
<template #icon>
@@ -602,7 +599,6 @@ onMounted(() => {
type="primary"
danger
ghost
class="danger-button"
@click.prevent="fnModalVisibleByBatch('delete')"
>
<template #icon>
@@ -611,7 +607,7 @@ onMounted(() => {
{{ t('views.neUser.pcf.batchDelText') }}
</a-button>
<a-button type="dashed" class="dashed-button" @click.prevent="fnModalUploadImportOpen">
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen">
<template #icon><ImportOutlined /></template>
{{ t('views.neUser.pcf.import') }}
</a-button>
@@ -624,18 +620,17 @@ onMounted(() => {
cancel-text="CSV"
@cancel="fnExportList('csv')"
>
<a-button type="dashed" class="dashed-button">
<a-button type="dashed">
<template #icon><ExportOutlined /></template>
{{ t('views.neUser.pcf.export') }}
</a-button>
</a-popconfirm>
</div>
</a-space>
</template>
<!-- 插槽-卡片右侧 -->
<template #extra>
<a-space :size="8" align="center">
<div class="button-container">
<a-tooltip>
<template #title>
{{
@@ -696,7 +691,7 @@ onMounted(() => {
</template>
</a-dropdown>
</a-tooltip>
</a-space>
</div>
</template>
<!-- 表格列表 -->

View File

@@ -1023,7 +1023,7 @@ onMounted(() => {
cancel-text="CSV"
@cancel="fnExportList('csv')"
>
<a-button type="dashed" class="dashed-button">
<a-button type="dashed">
<template #icon>
<ExportOutlined />
</template>

View File

@@ -0,0 +1,334 @@
<script setup lang="ts">
import { useRoute } from 'vue-router';
import { reactive, ref, onMounted, toRaw } from 'vue';
import { PageContainer } from 'antdv-pro-layout';
import { Modal } from 'ant-design-vue/lib';
import { SizeType } from 'ant-design-vue/lib/config-provider';
import { MenuInfo } from 'ant-design-vue/lib/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/lib/table';
import { parseDateToStr } from '@/utils/date-utils';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import { listgoldData } from '@/api/perfManage/goldTarget';
import useNeInfoStore from '@/store/modules/neinfo';
import useDictStore from '@/store/modules/dict';
import useI18n from '@/hooks/useI18n';
const { getDict } = useDictStore();
const { t } = useI18n();
const route = useRoute();
/**路由标题 */
let title = ref<string>((route.meta.title as string) ?? '标题');
/**记录开始结束时间 */
let queryRangePicker = ref<[string, string]>(['', '']);
/**查询参数 */
let queryParams = reactive({
/**网元类型 */
neType: '',
/**记录时间 */
beginTime: '',
endTime: '',
/**排序字段 */
sortField: 'value',
/**排序方式 */
sortOrder: 'asc',
/**当前页数 */
pageNum: 1,
/**每页条数 */
pageSize: 20,
});
/**查询参数重置 */
function fnQueryReset() {
queryParams = Object.assign(queryParams, {
neType: '',
beginTime: '',
endTime: '',
sortField: 'value',
sortOrder: 'asc',
pageNum: 1,
pageSize: 20,
});
queryRangePicker.value = ['', ''];
tablePagination.current = 1;
tablePagination.pageSize = 20;
fnGetList();
}
/**表格状态类型 */
type TabeStateType = {
/**加载等待 */
loading: boolean;
/**紧凑型 */
size: SizeType;
/**搜索栏 */
seached: boolean;
/**记录数据 */
data: object[];
};
/**表格状态 */
let tableState: TabeStateType = reactive({
loading: false,
size: 'middle',
seached: true,
data: [],
});
/**表格字段列 */
let tableColumns: ColumnsType = [
{
title: t('views.perfManage.goldTarget.type'),
dataIndex: 'neType',
align: 'center',
},
{
title: t('views.perfManage.goldTarget.enTitle'),
dataIndex: 'enTitle',
align: 'center',
},
{
title: t('views.perfManage.goldTarget.value'),
dataIndex: 'value',
key: 'value',
align: 'center',
sorter: true,
},
{
title: t('views.perfManage.goldTarget.startTime'),
dataIndex: 'startTime',
key: 'start_time',
align: 'center',
customRender(opt) {
if (!opt.value) return '';
return parseDateToStr(opt.value);
},
sorter: true,
},
{
title: t('views.perfManage.goldTarget.endTime'),
dataIndex: 'endTime',
align: 'center',
customRender(opt) {
if (!opt.value) return '';
return parseDateToStr(opt.value);
},
},
];
/**表格分页器参数 */
let tablePagination = reactive({
/**当前页数 */
current: 1,
/**每页条数 */
pageSize: 20,
/**默认的每页条数 */
defaultPageSize: 20,
/**指定每页可以显示多少条 */
pageSizeOptions: ['10', '20', '50', '100'],
/**只有一页时是否隐藏分页器 */
hideOnSinglePage: false,
/**是否可以快速跳转至某页 */
showQuickJumper: true,
/**是否可以改变 pageSize */
showSizeChanger: true,
/**数据总数 */
total: 0,
showTotal: (total: number) => t('common.tablePaginationTotal', { total }),
onChange: (page: number, pageSize: number) => {
tablePagination.current = page;
tablePagination.pageSize = pageSize;
queryParams.pageNum = page;
queryParams.pageSize = pageSize;
fnGetList();
},
});
/**表格紧凑型变更操作 */
function fnTableSize({ key }: MenuInfo) {
tableState.size = key as SizeType;
}
/**查询黄金指标列表, pageNum初始页数 */
function fnGetList(pageNum?: number) {
if (tableState.loading) return;
tableState.loading = true;
if (pageNum) {
queryParams.pageNum = pageNum;
}
if (!queryRangePicker.value) {
queryRangePicker.value = ['', ''];
}
queryParams.beginTime = queryRangePicker.value[0];
queryParams.endTime = queryRangePicker.value[1];
listgoldData(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
tablePagination.total = res.total;
tableState.data = res.rows;
}
tableState.loading = false;
});
}
/**表格分页、排序、筛选变化时触发操作, 排序方式,取值为 ascend descend */
function fnTableChange(pagination: any, filters: any, sorter: any, extra: any) {
console.log(sorter);
const { columnKey, order } = sorter;
if (order) {
queryParams.sortField = columnKey;
queryParams.sortOrder = order.replace('end', '');
} else {
queryParams.sortOrder = 'asc';
}
fnGetList(1);
}
onMounted(() => {
// 获取网元网元列表
useNeInfoStore().fnNelist();
// 获取列表数据
fnGetList();
});
</script>
<template>
<PageContainer>
<a-card
v-show="tableState.seached"
:bordered="false"
:body-style="{ marginBottom: '24px', paddingBottom: 0 }"
>
<!-- 表格搜索栏 -->
<a-form :model="queryParams" name="queryParams" layout="horizontal">
<a-row :gutter="16">
<a-col :lg="6" :md="12" :xs="24">
<a-form-item
:label="t('views.perfManage.goldTarget.type')"
name="neType"
>
<a-auto-complete
v-model:value="queryParams.neType"
:options="useNeInfoStore().getNeSelectOtions"
allow-clear
/>
</a-form-item>
</a-col>
<a-col :lg="8" :md="12" :xs="24">
<a-form-item
:label="t('views.perfManage.goldTarget.startTime')"
name="queryRangePicker"
>
<a-range-picker
v-model:value="queryRangePicker"
allow-clear
bordered
show-time
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm:ss"
style="width: 100%"
></a-range-picker>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
<a-form-item>
<a-space :size="8">
<a-button type="primary" @click.prevent="fnGetList(1)">
<template #icon><SearchOutlined /></template>
{{ t('common.search') }}
</a-button>
<a-button type="default" @click.prevent="fnQueryReset">
<template #icon><ClearOutlined /></template>
{{ t('common.reset') }}
</a-button>
</a-space>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-card>
<a-card :bordered="false" :body-style="{ padding: '0px' }">
<!-- 插槽-卡片左侧侧 -->
<template #title> </template>
<!-- 插槽-卡片右侧 -->
<template #extra>
<a-space :size="8" align="center">
<a-tooltip>
<template #title>{{ t('common.searchBarText') }}</template>
<a-switch
v-model:checked="tableState.seached"
:checked-children="t('common.switch.show')"
:un-checked-children="t('common.switch.hide')"
size="small"
/>
</a-tooltip>
<a-tooltip>
<template #title>{{ t('common.reloadText') }}</template>
<a-button type="text" @click.prevent="fnGetList()">
<template #icon><ReloadOutlined /></template>
</a-button>
</a-tooltip>
<a-tooltip>
<template #title>{{ t('common.sizeText') }}</template>
<a-dropdown trigger="click" placement="bottomRight">
<a-button type="text">
<template #icon><ColumnHeightOutlined /></template>
</a-button>
<template #overlay>
<a-menu
:selected-keys="[tableState.size as string]"
@click="fnTableSize"
>
<a-menu-item key="default">
{{ t('common.size.default') }}
</a-menu-item>
<a-menu-item key="middle">
{{ t('common.size.middle') }}
</a-menu-item>
<a-menu-item key="small">
{{ t('common.size.small') }}
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</a-tooltip>
</a-space>
</template>
<!-- 表格列表 -->
<a-table
class="table"
row-key="id"
:columns="tableColumns"
:loading="tableState.loading"
:data-source="tableState.data"
:size="tableState.size"
@change="fnTableChange"
:pagination="tablePagination"
:scroll="{ x: true }"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'alarmTitle'">
<a-tooltip>
<template #title>{{ record.operResult }}</template>
<div class="alarmTitleText">{{ record.alarmTitle }}</div>
</a-tooltip>
</template>
</template>
</a-table>
</a-card>
</PageContainer>
</template>
<style lang="less" scoped>
.table :deep(.ant-pagination) {
padding: 0 24px;
}
.alarmTitleText {
max-width: 300px;
cursor: pointer;
}
</style>

View File

@@ -552,11 +552,9 @@ onMounted(() => {
<a-card :bordered="false" :body-style="{ padding: '0px' }">
<!-- 插槽-卡片左侧侧 -->
<template #title>
<a-space :size="8" align="center">
<div class="button-container">
<a-button
type="primary"
class="primary-button"
@click.prevent="fnModalVisibleByEdit()"
v-perms:has="['system:config:add']"
>
@@ -566,7 +564,6 @@ onMounted(() => {
<a-button
type="default"
danger
class="danger-button"
:disabled="tableState.selectedRowKeys.length <= 0"
@click.prevent="fnRecordDelete()"
v-perms:has="['system:config:remove']"
@@ -577,7 +574,6 @@ onMounted(() => {
<a-button
type="dashed"
danger
class="danger-button"
@click.prevent="fnRefreshCache"
v-perms:has="['system:config:remove']"
>
@@ -587,19 +583,17 @@ onMounted(() => {
<a-button
type="dashed"
@click.prevent="fnExportList()"
class="dashed-button"
v-perms:has="['system:config:export']"
>
<template #icon><ExportOutlined /></template>
{{ t('common.export') }}
</a-button>
</div>
</a-space>
</template>
<!-- 插槽-卡片右侧 -->
<template #extra>
<a-space :size="8" align="center">
<div class="button-container">
<a-tooltip>
<template #title>{{ t('common.searchBarText') }}</template>
<a-switch
@@ -648,7 +642,7 @@ onMounted(() => {
</template>
</a-dropdown>
</a-tooltip>
</a-space>
</div>
</template>
<!-- 表格列表 -->

View File

@@ -561,19 +561,13 @@ onMounted(() => {
<a-card :bordered="false" :body-style="{ padding: '0px' }">
<!-- 插槽-卡片左侧侧 -->
<template #title>
<a-space :size="8" align="center">
<div class="button-container">
<a-button
type="default"
class="primary-button"
@click.prevent="fnClose()"
>
<a-button type="default" @click.prevent="fnClose()">
<template #icon><CloseOutlined /></template>
{{ t('common.close') }}
</a-button>
<a-button
type="primary"
class="primary-button"
@click.prevent="fnModalVisibleByEdit()"
v-perms:has="['system:dict:add']"
>
@@ -583,7 +577,6 @@ onMounted(() => {
<a-button
type="default"
danger
class="danger-button"
:disabled="tableState.selectedRowKeys.length <= 0"
@click.prevent="fnRecordDelete()"
v-perms:has="['system:dict:remove']"
@@ -593,7 +586,6 @@ onMounted(() => {
</a-button>
<a-button
type="dashed"
class="dashed-button"
@click.prevent="fnExportList()"
v-perms:has="['system:dict:export']"
>
@@ -601,12 +593,11 @@ onMounted(() => {
{{ t('common.export') }}
</a-button>
</div>
</a-space>
</template>
<!-- 插槽-卡片右侧 -->
<template #extra>
<a-space :size="8" align="center">
<div class="button-container">
<a-tooltip>
<template #title>{{ t('common.searchBarText') }}</template>
<a-switch
@@ -655,7 +646,7 @@ onMounted(() => {
</template>
</a-dropdown>
</a-tooltip>
</a-space>
</div>
</template>
<!-- 表格列表 -->

View File

@@ -552,11 +552,9 @@ onMounted(() => {
<a-card :bordered="false" :body-style="{ padding: '0px' }">
<!-- 插槽-卡片左侧侧 -->
<template #title>
<a-space :size="8" align="center">
<div class="button-container">
<a-button
type="primary"
class="primary-button"
@click.prevent="fnModalVisibleByEdit()"
v-perms:has="['system:dict:add']"
>
@@ -566,7 +564,6 @@ onMounted(() => {
<a-button
type="default"
danger
class="danger-button"
:disabled="tableState.selectedRowKeys.length <= 0"
@click.prevent="fnRecordDelete()"
v-perms:has="['system:dict:remove']"
@@ -576,7 +573,6 @@ onMounted(() => {
</a-button>
<a-button
type="default"
class="primary-button"
@click.prevent="fnDataView()"
v-perms:has="['system:dict:data']"
>
@@ -586,7 +582,6 @@ onMounted(() => {
<a-button
type="dashed"
danger
class="danger-button"
@click.prevent="fnRefreshCache"
v-perms:has="['system:dict:remove']"
>
@@ -595,7 +590,6 @@ onMounted(() => {
</a-button>
<a-button
type="dashed"
class="dashed-button"
@click.prevent="fnExportList()"
v-perms:has="['system:dict:export']"
>
@@ -603,12 +597,11 @@ onMounted(() => {
{{ t('common.export') }}
</a-button>
</div>
</a-space>
</template>
<!-- 插槽-卡片右侧 -->
<template #extra>
<a-space :size="8" align="center">
<div class="button-container">
<a-tooltip>
<template #title>{{ t('common.searchBarText') }}</template>
<a-switch
@@ -657,7 +650,7 @@ onMounted(() => {
</template>
</a-dropdown>
</a-tooltip>
</a-space>
</div>
</template>
<!-- 表格列表 -->

View File

@@ -491,11 +491,9 @@ onMounted(() => {
<a-card :bordered="false" :body-style="{ padding: '0px' }">
<!-- 插槽-卡片左侧侧 -->
<template #title>
<a-space :size="8" align="center">
<div class="button-container">
<a-button
type="primary"
class="primary-button"
@click.prevent="fnModalVisibleByEdit()"
v-perms:has="['system:post:add']"
>
@@ -505,7 +503,6 @@ onMounted(() => {
<a-button
type="default"
danger
class="danger-button"
:disabled="tableState.selectedRowKeys.length <= 0"
@click.prevent="fnRecordDelete()"
v-perms:has="['system:post:remove']"
@@ -515,8 +512,6 @@ onMounted(() => {
</a-button>
<a-button
type="dashed"
class="dashed-button"
@click.prevent="fnExportList()"
v-perms:has="['system:post:export']"
>
@@ -524,12 +519,11 @@ onMounted(() => {
{{ t('common.export') }}
</a-button>
</div>
</a-space>
</template>
<!-- 插槽-卡片右侧 -->
<template #extra>
<a-space :size="8" align="center">
<div class="button-container">
<a-tooltip>
<template #title>{{ t('common.searchBarText') }}</template>
<a-switch
@@ -578,7 +572,7 @@ onMounted(() => {
</template>
</a-dropdown>
</a-tooltip>
</a-space>
</div>
</template>
<!-- 表格列表 -->

View File

@@ -394,19 +394,13 @@ onMounted(() => {
<a-card :bordered="false" :body-style="{ padding: '0px' }">
<!-- 插槽-卡片左侧侧 -->
<template #title>
<a-space :size="8" align="center">
<div class="button-container">
<a-button
type="default"
class="primary-button"
@click.prevent="fnClose()"
>
<a-button type="default" @click.prevent="fnClose()">
<template #icon><CloseOutlined /></template>
{{ t('common.cancel') }}
</a-button>
<a-button
type="primary"
class="primary-button"
@click.prevent="fnModalVisibleBySelectUser()"
v-perms:has="['system:role:add']"
>
@@ -416,7 +410,6 @@ onMounted(() => {
<a-button
type="default"
danger
class="danger-button"
:disabled="tableState.selectedRowKeys.length <= 0"
@click.prevent="fnRecordDelete('0')"
v-perms:has="['system:role:remove']"
@@ -425,12 +418,11 @@ onMounted(() => {
{{ t('views.system.role.batchCancel') }}
</a-button>
</div>
</a-space>
</template>
<!-- 插槽-卡片右侧 -->
<template #extra>
<a-space :size="8" align="center">
<div class="button-container">
<a-tooltip>
<template #title>{{ t('common.searchBarText') }}</template>
<a-switch
@@ -479,7 +471,7 @@ onMounted(() => {
</template>
</a-dropdown>
</a-tooltip>
</a-space>
</div>
</template>
<!-- 表格列表 -->

View File

@@ -815,12 +815,9 @@ onMounted(() => {
<a-card :bordered="false" :body-style="{ padding: '0px' }">
<!-- 插槽-卡片左侧侧 -->
<template #title>
<a-space :size="8" align="center">
<div class="button-container">
<a-button
type="primary"
class="primary-button"
@click.prevent="fnModalVisibleByEdit()"
v-perms:has="['system:role:add']"
>
@@ -830,8 +827,6 @@ onMounted(() => {
<a-button
type="default"
danger
class="danger-button"
:disabled="tableState.selectedRowKeys.length <= 0"
@click.prevent="fnRecordDelete()"
v-perms:has="['system:role:remove']"
@@ -848,7 +843,6 @@ onMounted(() => {
{{ t('common.export') }}
</a-button>
</div>
</a-space>
</template>
<!-- 插槽-卡片右侧 -->
@@ -1242,7 +1236,10 @@ onMounted(() => {
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item :label="t('views.system.role.createTime')" name="createTime">
<a-form-item
:label="t('views.system.role.createTime')"
name="createTime"
>
<span v-if="+modalState.from.createTime > 0">
{{ parseDateToStr(+modalState.from.createTime) }}
</span>
@@ -1251,12 +1248,18 @@ onMounted(() => {
</a-row>
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item :label="t('views.system.role.roleSort')" name="roleSort">
<a-form-item
:label="t('views.system.role.roleSort')"
name="roleSort"
>
{{ modalState.from.roleSort }}
</a-form-item>
</a-col>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item :label="t('views.system.role.roleStatus')" name="status">
<a-form-item
:label="t('views.system.role.roleStatus')"
name="status"
>
<DictTag
:options="dict.sysNormalDisable"
:value="modalState.from.status"
@@ -1266,7 +1269,10 @@ onMounted(() => {
</a-row>
<a-row :gutter="16">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item :label="t('views.system.role.roleName')" name="roleName">
<a-form-item
:label="t('views.system.role.roleName')"
name="roleName"
>
{{ modalState.from.roleName }}
</a-form-item>
</a-col>
@@ -1299,21 +1305,21 @@ onMounted(() => {
:checked="modalState.deptTree.expandedKeys.length > 0"
@change="(e:any) => fnModalExpandedKeys(e.target.checked, 'dept')"
>
{{t('views.system.role.openSwitch')}}
{{ t('views.system.role.openSwitch') }}
</a-checkbox>
<a-checkbox
id="dept_2"
:checked="modalState.from.deptIds.length > 0"
@change="(e:any) => fnModalCheckedKeys(e.target.checked, 'dept')"
>
{{t('views.system.role.selAllSwitch')}}
{{ t('views.system.role.selAllSwitch') }}
</a-checkbox>
<a-checkbox
id="dept_1"
:checked="modalState.from.deptCheckStrictly === '1'"
@change="(e:any) => fnModalCheckStrictly(e.target.checked, 'dept')"
>
{{t('views.system.role.relationSwitch')}}
{{ t('views.system.role.relationSwitch') }}
</a-checkbox>
</a-space>
<a-tree

View File

@@ -889,11 +889,9 @@ onMounted(() => {
<a-card :bordered="false" :body-style="{ padding: '0px' }">
<!-- 插槽-卡片左侧侧 -->
<template #title>
<a-space :size="8" align="center">
<div class="button-container">
<a-button
type="primary"
class="primary-button"
@click.prevent="fnModalVisibleByEdit()"
v-perms:has="['system:user:add']"
>
@@ -903,7 +901,6 @@ onMounted(() => {
<a-button
type="default"
danger
class="danger-button"
:disabled="tableState.selectedRowKeys.length <= 0"
@click.prevent="fnRecordDelete()"
v-perms:has="['system:user:remove']"
@@ -913,7 +910,6 @@ onMounted(() => {
</a-button>
<a-button
type="dashed"
class="dashed-button"
@click.prevent="fnModalUploadImportOpen()"
v-perms:has="['system:user:import']"
>
@@ -922,7 +918,6 @@ onMounted(() => {
</a-button>
<a-button
type="dashed"
class="dashed-button"
@click.prevent="fnExportList()"
v-perms:has="['system:user:export']"
>
@@ -930,12 +925,11 @@ onMounted(() => {
{{ t('common.export') }}
</a-button>
</div>
</a-space>
</template>
<!-- 插槽-卡片右侧 -->
<template #extra>
<a-space :size="8" align="center">
<div class="button-container">
<a-tooltip>
<template #title>{{ t('common.searchBarText') }}</template>
<a-switch
@@ -984,7 +978,7 @@ onMounted(() => {
</template>
</a-dropdown>
</a-tooltip>
</a-space>
</div>
</template>
<!-- 表格列表 -->