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