feat: 页面调整组件属性升级

This commit is contained in:
TsMask
2024-10-28 11:02:39 +08:00
parent 670225a655
commit da0d49d306
125 changed files with 1775 additions and 3464 deletions

View File

@@ -1,9 +1,10 @@
<script setup lang="ts">
import { PageContainer } from 'antdv-pro-layout';
import { message, Modal, Form } 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 { ProModal } from 'antdv-pro-modal';
import { message, Modal, Form } from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import IconFont from '@/components/IconFont/index.vue';
import { iconFonts } from '@/assets/js/icon_font_8d5l8fzk5b87iudi';
import { reactive, onMounted, toRaw } from 'vue';
@@ -213,9 +214,9 @@ function fnTreeDataChange(value: any) {
/**对话框对象信息状态类型 */
type ModalStateType = {
/**详情框是否显示 */
visibleByView: boolean;
openByView: boolean;
/**新增框或修改框是否显示 */
visibleByEdit: boolean;
openByEdit: boolean;
/**标题 */
title: string;
/**表单数据 */
@@ -228,8 +229,8 @@ type ModalStateType = {
/**对话框对象信息状态 */
let modalState: ModalStateType = reactive({
visibleByView: false,
visibleByEdit: false,
openByView: false,
openByEdit: false,
title: '菜单',
from: {
menuId: undefined,
@@ -317,7 +318,7 @@ function fnModalVisibleByVive(menuId: string | number) {
if (res.code === RESULT_CODE_SUCCESS && res.data) {
modalState.from = Object.assign(modalState.from, res.data);
modalState.title = t('views.system.menu.menuInfo');
modalState.visibleByView = true;
modalState.openByView = true;
} else {
message.error(t('common.getInfoFail'), 2);
}
@@ -342,7 +343,7 @@ function fnModalVisibleByEdit(
modalState.from.parentType = parentType;
}
modalState.title = t('common.addText') + t('views.system.menu.menuInfo');
modalState.visibleByEdit = true;
modalState.openByEdit = true;
} else {
if (modalState.confirmLoading) return;
const hide = message.loading(t('common.loading'), 0);
@@ -354,7 +355,7 @@ function fnModalVisibleByEdit(
modalState.from = Object.assign(modalState.from, res.data);
modalState.title =
t('common.editText') + t('views.system.menu.menuInfo');
modalState.visibleByEdit = true;
modalState.openByEdit = true;
} else {
message.error(t('common.getInfoFail'), 2);
}
@@ -395,7 +396,7 @@ function fnModalOk() {
key,
duration: 2,
});
modalState.visibleByEdit = false;
modalState.openByEdit = false;
modalStateFrom.resetFields();
treeDataAll = [];
fnGetList();
@@ -421,8 +422,8 @@ function fnModalOk() {
* 进行表达规则校验
*/
function fnModalCancel() {
modalState.visibleByEdit = false;
modalState.visibleByView = false;
modalState.openByEdit = false;
modalState.openByView = false;
modalStateFrom.resetFields();
}
@@ -720,7 +721,7 @@ onMounted(() => {
<ProModal
:drag="true"
:width="800"
:visible="modalState.visibleByView"
:open="modalState.openByView"
:title="modalState.title"
@cancel="fnModalCancel"
>
@@ -753,7 +754,7 @@ onMounted(() => {
>
{{ modalState.from.menuName }}
</a-form-item>
<a-row :gutter="16">
<a-row>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item :label="t('views.system.menu.menuId')" name="menuId">
{{ modalState.from.menuId }}
@@ -768,7 +769,7 @@ onMounted(() => {
</a-form-item>
</a-col>
</a-row>
<a-row :gutter="16">
<a-row>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.system.menu.menuType')"
@@ -804,7 +805,7 @@ onMounted(() => {
</a-col>
</a-row>
<a-row :gutter="16">
<a-row>
<a-col
:lg="12"
:md="12"
@@ -830,10 +831,7 @@ onMounted(() => {
</a-col>
</a-row>
<a-row
:gutter="16"
v-if="modalState.from.menuType !== MENU_TYPE_BUTTON"
>
<a-row v-if="modalState.from.menuType !== MENU_TYPE_BUTTON">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item :label="t('views.system.menu.local')" name="isFrame">
<a-tag color="default">
@@ -917,7 +915,7 @@ onMounted(() => {
:destroyOnClose="true"
:keyboard="false"
:mask-closable="false"
:visible="modalState.visibleByEdit"
:open="modalState.openByEdit"
:title="modalState.title"
:confirm-loading="modalState.confirmLoading"
@ok="fnModalOk"
@@ -955,7 +953,7 @@ onMounted(() => {
</a-tree-select>
</a-form-item>
<a-row :gutter="16">
<a-row>
<a-col :lg="12" :md="12" :xs="24">
<a-form-item
:label="t('views.system.menu.menuName')"
@@ -1010,10 +1008,7 @@ onMounted(() => {
</a-radio-group>
</a-form-item>
<a-row
:gutter="16"
v-if="modalState.from.menuType !== MENU_TYPE_BUTTON"
>
<a-row v-if="modalState.from.menuType !== MENU_TYPE_BUTTON">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item :label="t('views.system.menu.menuTitle')" name="icon">
<a-select
@@ -1052,7 +1047,7 @@ onMounted(() => {
}}
</div>
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
</a-tooltip>
</template>
</a-input>
@@ -1060,10 +1055,7 @@ onMounted(() => {
</a-col>
</a-row>
<a-row
:gutter="16"
v-if="modalState.from.menuType !== MENU_TYPE_BUTTON"
>
<a-row v-if="modalState.from.menuType !== MENU_TYPE_BUTTON">
<a-col :lg="12" :md="12" :xs="24">
<a-form-item :label="t('views.system.menu.local')" name="isFrame">
<a-select
@@ -1143,7 +1135,7 @@ onMounted(() => {
{{ t('views.system.menu.componentTip') }}
</div>
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
</a-tooltip>
</template>
</a-input>
@@ -1165,7 +1157,7 @@ onMounted(() => {
{{ t('views.system.menu.perms') }}
</div>
</template>
<InfoCircleOutlined style="color: rgba(0, 0, 0, 0.45)" />
<InfoCircleOutlined style="opacity: 0.45; color: inherit" />
</a-tooltip>
</template>
</a-input>