😎格式化代码
This commit is contained in:
parent
81ce1a5328
commit
402125b814
@ -29,8 +29,4 @@
|
||||
<ProjectReference Include="..\Plugins\Admin.NET.Plugin.GoView\Admin.NET.Plugin.GoView.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Entity\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
<PackageReference Include="SqlSugarCore" Version="5.1.4.170" />
|
||||
<PackageReference Include="SSH.NET" Version="2024.1.0" />
|
||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.4.7" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1113" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1114" />
|
||||
<PackageReference Include="UAParser" Version="3.1.47" />
|
||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
"vue-router": "^4.4.5",
|
||||
"vue-signature-pad": "^3.0.2",
|
||||
"vue3-tree-org": "^4.2.2",
|
||||
"vxe-pc-ui": "^4.2.34",
|
||||
"vxe-pc-ui": "^4.2.35",
|
||||
"vxe-table": "^4.7.59",
|
||||
"vxe-table-plugin-element": "^4.0.4",
|
||||
"vxe-table-plugin-export-xlsx": "^4.0.7",
|
||||
|
||||
2
Web/src/types/mitt.d.ts
vendored
2
Web/src/types/mitt.d.ts
vendored
@ -24,7 +24,7 @@ declare type MittType<T = any> = {
|
||||
openShareTagsView?: string;
|
||||
onTagsViewRefreshRouterView?: T;
|
||||
onCurrentContextmenuClick?: T;
|
||||
submitRefreshFk?:T
|
||||
submitRefreshFk?: T;
|
||||
};
|
||||
|
||||
// mitt 参数类型定义
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="sys-codeGenConfig-container">
|
||||
<vxe-modal v-model="state.isShowDialog" title="生成配置" :width="800" :height="350" show-footer show-zoom resize fullscreen
|
||||
@close="cancel">
|
||||
<vxe-modal v-model="state.isShowDialog" title="生成配置" :width="800" :height="350" show-footer show-zoom resize fullscreen @close="cancel">
|
||||
<template #default>
|
||||
<vxe-grid ref="xGrid" class="xGrid-table-style" v-bind="options">
|
||||
<template #drag_default="{}">
|
||||
@ -10,21 +9,17 @@
|
||||
</span>
|
||||
</template>
|
||||
<template #effectType="{ row, $index }">
|
||||
<vxe-select v-model="row.effectType" class="m-2" style="width: 70%" placeholder="Select" transfer
|
||||
:disabled="judgeColumns(row)" @change="effectTypeChange(row, $index)" filterable>
|
||||
<vxe-option v-for="item in state.effectTypeList" :key="item.code" :label="item.value"
|
||||
:value="item.code" />
|
||||
<vxe-select v-model="row.effectType" class="m-2" style="width: 70%" placeholder="Select" transfer :disabled="judgeColumns(row)" @change="effectTypeChange(row, $index)" filterable>
|
||||
<vxe-option v-for="item in state.effectTypeList" :key="item.code" :label="item.value" :value="item.code" />
|
||||
</vxe-select>
|
||||
<vxe-button v-if="row.effectType === 'ApiTreeSelect' || row.effectType === 'fk'" style="width: 30%"
|
||||
icon="vxe-icon-edit" @click="effectTypeChange(row, $index)">修改</vxe-button>
|
||||
<vxe-button v-if="row.effectType === 'ApiTreeSelect' || row.effectType === 'fk'" style="width: 30%" icon="vxe-icon-edit" @click="effectTypeChange(row, $index)">修改</vxe-button>
|
||||
</template>
|
||||
<template #columnComment="{ row }">
|
||||
<vxe-input v-model="row.columnComment" autocomplete="off" />
|
||||
</template>
|
||||
<template #dictType="{ row }">
|
||||
<vxe-select v-model="row.dictTypeCode" class="m-2" :disabled="effectTypeEnable(row)" filterable transfer>
|
||||
<vxe-option v-for="item in state.dictTypeCodeList" :key="item.code" :label="item.name"
|
||||
:value="item.code" />
|
||||
<vxe-option v-for="item in state.dictTypeCodeList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</vxe-select>
|
||||
</template>
|
||||
<template #whetherTable="{ row }">
|
||||
@ -41,18 +36,15 @@
|
||||
<vxe-tag v-else status="info">否</vxe-tag>
|
||||
</template>
|
||||
<template #queryWhether="{ row }">
|
||||
<vxe-switch readonly v-model="row.queryWhether" open-label="是" close-label="否" :openValue="true"
|
||||
:closeValue="false"></vxe-switch>
|
||||
<vxe-switch readonly v-model="row.queryWhether" open-label="是" close-label="否" :openValue="true" :closeValue="false"></vxe-switch>
|
||||
</template>
|
||||
<template #queryType="{ row }">
|
||||
<vxe-select v-model="row.queryType" class="m-2" placeholder="Select" :disabled="!row.queryWhether"
|
||||
filterable transfer>
|
||||
<vxe-select v-model="row.queryType" class="m-2" placeholder="Select" :disabled="!row.queryWhether" filterable transfer>
|
||||
<vxe-option v-for="item in state.queryTypeList" :key="item.code" :label="item.value" :value="item.code" />
|
||||
</vxe-select>
|
||||
</template>
|
||||
<template #verification="{ row }">
|
||||
<vxe-button status="primary" plain v-if="row.columnKey === 'False' && !row.whetherCommon"
|
||||
@click="openVerifyDialog(row)">校验规则{{ row.ruleCount }}</vxe-button>
|
||||
<vxe-button status="primary" plain v-if="row.columnKey === 'False' && !row.whetherCommon" @click="openVerifyDialog(row)">校验规则{{ row.ruleCount }}</vxe-button>
|
||||
<span v-else></span>
|
||||
</template>
|
||||
</vxe-grid>
|
||||
@ -72,15 +64,17 @@
|
||||
<script lang="ts" setup name="sysCodeGenConfig">
|
||||
import { nextTick, onMounted, onUnmounted, reactive, ref } from 'vue';
|
||||
import mittBus from '/@/utils/mitt';
|
||||
import Sortable from 'sortablejs';
|
||||
import { VxeGridInstance, VxeGridProps } from 'vxe-pc-ui';
|
||||
|
||||
import fkDialog from '/@/views/system/codeGen/component/fkDialog.vue';
|
||||
import treeDialog from '/@/views/system/codeGen/component/treeDialog.vue';
|
||||
import verifyDialog from '/@/views/system/codeGen/component/verifyDialog.vue';
|
||||
|
||||
import { getAPI } from '/@/utils/axios-utils';
|
||||
import { SysCodeGenConfigApi, SysConstApi, SysDictDataApi, SysDictTypeApi, SysEnumApi } from '/@/api-services/api';
|
||||
import { VxeGridInstance, VxeGridProps } from 'vxe-pc-ui';
|
||||
import Sortable from 'sortablejs';
|
||||
// import { CodeGenConfig } from '/@/api-services/models/code-gen-config';
|
||||
|
||||
const xGrid = ref<VxeGridInstance<any>>();
|
||||
const emits = defineEmits(['handleQuery']);
|
||||
const fkDialogRef = ref();
|
||||
@ -98,6 +92,7 @@
|
||||
allEnumSelector: [] as any,
|
||||
sortable: undefined as any,
|
||||
});
|
||||
|
||||
// 表格参数配置
|
||||
const options = reactive<VxeGridProps>({
|
||||
id: 'genConfigDialog',
|
||||
@ -300,6 +295,7 @@
|
||||
xGrid.value?.reloadData(tableData);
|
||||
};
|
||||
|
||||
// 页面初始化
|
||||
onUnmounted(() => {
|
||||
// mittBus.off('submitRefresh', () => {});
|
||||
mittBus.off('submitRefreshFk', () => {});
|
||||
@ -431,7 +427,6 @@
|
||||
const submit = async () => {
|
||||
state.loading = true;
|
||||
let lst = xGrid.value?.getData() || [];
|
||||
// console.log(lst);
|
||||
let ignoreFields = ['remoteVerify', 'anyRule', 'columnKey'];
|
||||
lst.forEach((item: any) => {
|
||||
// 必填那一项转换
|
||||
@ -452,10 +447,10 @@
|
||||
// 导出对象
|
||||
defineExpose({ openDialog });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.xGrid-table-style .drag-btn {
|
||||
cursor: move;
|
||||
font-size: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,20 +1,17 @@
|
||||
<template>
|
||||
<div class="sys-dbTable-container">
|
||||
<vxe-modal v-model="state.visible" title="增加表" :width="800" :height="350" resize show-footer show-confirm-button
|
||||
show-cancel-button show-zoom fullscreen @close="cancel">
|
||||
<vxe-modal v-model="state.visible" title="增加表" :width="800" :height="350" resize show-footer show-confirm-button show-cancel-button show-zoom fullscreen @close="cancel">
|
||||
<template #default>
|
||||
<el-divider content-position="left" style="margin: 10px 0 18px 0">数据表信息</el-divider>
|
||||
<el-form :model="state.ruleForm" ref="ruleFormRef" label-width="auto">
|
||||
<el-row>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
<el-form-item label="表名称" prop="tableName"
|
||||
:rules="[{ required: true, message: '名称不能为空', trigger: 'blur' }]">
|
||||
<el-form-item label="表名称" prop="tableName" :rules="[{ required: true, message: '名称不能为空', trigger: 'blur' }]">
|
||||
<el-input v-model.lazy.trim="state.ruleForm.tableName" placeholder="表名称" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
|
||||
<el-form-item label="描述" prop="description"
|
||||
:rules="[{ required: true, message: '描述不能为空', trigger: 'blur' }]">
|
||||
<el-form-item label="描述" prop="description" :rules="[{ required: true, message: '描述不能为空', trigger: 'blur' }]">
|
||||
<el-input v-model.lazy.trim="state.ruleForm.description" placeholder="描述" clearable type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -40,16 +37,13 @@
|
||||
</span>
|
||||
</template>
|
||||
<template #isPrimarykey="{ row }">
|
||||
<vxe-switch readonly v-model="row.isPrimarykey" open-label="是" close-label="否" :openValue="1"
|
||||
:closeValue="0"></vxe-switch>
|
||||
<vxe-switch readonly v-model="row.isPrimarykey" open-label="是" close-label="否" :openValue="1" :closeValue="0"></vxe-switch>
|
||||
</template>
|
||||
<template #isIdentity="{ row }">
|
||||
<vxe-switch readonly v-model="row.isIdentity" open-label="是" close-label="否" :openValue="1"
|
||||
:closeValue="0"></vxe-switch>
|
||||
<vxe-switch readonly v-model="row.isIdentity" open-label="是" close-label="否" :openValue="1" :closeValue="0"></vxe-switch>
|
||||
</template>
|
||||
<template #isNullable="{ row }">
|
||||
<vxe-switch readonly v-model="row.isNullable" open-label="是" close-label="否" :openValue="1"
|
||||
:closeValue="0"></vxe-switch>
|
||||
<vxe-switch readonly v-model="row.isNullable" open-label="是" close-label="否" :openValue="1" :closeValue="0"></vxe-switch>
|
||||
</template>
|
||||
<template #operate="{ row }">
|
||||
<vxe-button mode="text" status="error" icon="vxe-icon-delete" @click="deleteRow(row)" />
|
||||
@ -69,7 +63,6 @@
|
||||
import { nextTick, reactive, ref } from 'vue';
|
||||
import { ElMessage, dayjs } from 'element-plus';
|
||||
import { VxeGridInstance, VxeGridProps } from 'vxe-table';
|
||||
import { Rank } from '@element-plus/icons-vue';
|
||||
import Sortable from 'sortablejs';
|
||||
import { dataTypeList } from '../database';
|
||||
|
||||
@ -137,7 +130,7 @@
|
||||
minWidth: 100,
|
||||
editRender: { name: '$switch', props: { openValue: 1, closeValue: 0, openLabel: '是', closeLabel: '否', immediate: true } },
|
||||
slots: {
|
||||
default: "isPrimarykey"
|
||||
default: 'isPrimarykey',
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -146,7 +139,7 @@
|
||||
minWidth: 100,
|
||||
editRender: { name: '$switch', props: { openValue: 1, closeValue: 0, openLabel: '是', closeLabel: '否' } },
|
||||
slots: {
|
||||
default: "isIdentity"
|
||||
default: 'isIdentity',
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -166,7 +159,7 @@
|
||||
minWidth: 100,
|
||||
editRender: { name: '$switch', props: { openValue: 1, closeValue: 0, openLabel: '是', closeLabel: '否' } },
|
||||
slots: {
|
||||
default: "isNullable"
|
||||
default: 'isNullable',
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -189,7 +182,7 @@
|
||||
showOverflow: true,
|
||||
fixed: 'right',
|
||||
slots: {
|
||||
default: "operate",
|
||||
default: 'operate',
|
||||
},
|
||||
},
|
||||
],
|
||||
@ -455,7 +448,8 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.sys-dbTable-container :deep(.el-dialog__body) {}
|
||||
.sys-dbTable-container :deep(.el-dialog__body) {
|
||||
}
|
||||
|
||||
.xGrid-table-style .drag-btn {
|
||||
cursor: move;
|
||||
@ -467,4 +461,3 @@
|
||||
background-color: #e40000 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user