From 1826cb43abb24dea05a8763c0c97aedd9bd0495e Mon Sep 17 00:00:00 2001 From: tak Date: Mon, 11 Dec 2023 11:22:23 +0800 Subject: [PATCH 1/4] =?UTF-8?q?curl=E7=B1=BB=E5=9E=8B=EF=BC=8C=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E6=B5=AE=E7=82=B9=E6=95=B0=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=EF=BC=8C=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=97=B6=E5=80=99=E7=94=A8=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/internal/library/hggen/views/column_map.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/internal/library/hggen/views/column_map.go b/server/internal/library/hggen/views/column_map.go index f5e49b0..43d03da 100644 --- a/server/internal/library/hggen/views/column_map.go +++ b/server/internal/library/hggen/views/column_map.go @@ -219,6 +219,8 @@ func IsNumberType(goType string) bool { switch goType { case GoTypeInt, GoTypeUint, GoTypeInt64, GoTypeUint64: return true + case GoTypeFloat32, GoTypeFloat64: + return true } return false } From dddb932a468b3a99e80e7cb2fa94bf2867e755f1 Mon Sep 17 00:00:00 2001 From: tak Date: Mon, 18 Dec 2023 18:31:31 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE=20-=20?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=85=8D=E7=BD=AE=20-=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=201.=20=E6=96=B0=E5=A2=9E=E5=BC=82=E6=AD=A5=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E7=9A=84=E7=BB=84=E4=BB=B6=EF=BC=8C=E7=94=A8=E5=88=B0=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E5=86=8D=E5=8A=A0=E8=BD=BD=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=202.=20=E7=9F=AD=E4=BF=A1=E5=92=8C=E4=BA=91=E5=AD=98=E5=AD=98?= =?UTF-8?q?=E5=82=A8=20=E6=96=B0=E5=A2=9E=E9=80=89=E5=8D=A1=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8C=E9=80=89=E4=B8=AD=E7=9A=84=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=EF=BC=8C=E8=87=AA=E5=8A=A8=E5=88=87=E6=8D=A2=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E5=8D=A1=EF=BC=88=E4=B9=8B=E5=89=8D=E7=9A=84=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=BF=87=E9=95=BF=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/system/config/SmsSetting.vue | 417 ++++++----- web/src/views/system/config/UploadSetting.vue | 699 +++++++++--------- web/src/views/system/config/system.vue | 47 +- 3 files changed, 629 insertions(+), 534 deletions(-) diff --git a/web/src/views/system/config/SmsSetting.vue b/web/src/views/system/config/SmsSetting.vue index d6e6748..b19031c 100644 --- a/web/src/views/system/config/SmsSetting.vue +++ b/web/src/views/system/config/SmsSetting.vue @@ -1,7 +1,13 @@ +} + \ No newline at end of file diff --git a/web/src/views/system/config/UploadSetting.vue b/web/src/views/system/config/UploadSetting.vue index 6b64fd2..66bd0fa 100644 --- a/web/src/views/system/config/UploadSetting.vue +++ b/web/src/views/system/config/UploadSetting.vue @@ -1,7 +1,13 @@ - + + @@ -92,21 +88,21 @@ import { BasicForm, useForm } from '@/components/Form/index'; import { usePermission } from '@/hooks/web/usePermission'; import { List, Export, Delete, Status } from '@/api/curdDemo'; - import { State, columns, schemas, options, newState } from './model'; + import { columns, schemas, options } from './model'; import { PlusOutlined, ExportOutlined, DeleteOutlined } from '@vicons/antd'; - import { useRouter } from 'vue-router'; import { getOptionLabel } from '@/utils/hotgo'; import Edit from './edit.vue'; - const { hasPermission } = usePermission(); - const router = useRouter(); - const actionRef = ref(); + import View from './view.vue'; + const dialog = useDialog(); const message = useMessage(); + const { hasPermission } = usePermission(); + const actionRef = ref(); const searchFormRef = ref({}); + const viewRef = ref(); + const editRef = ref(); const batchDeleteDisabled = ref(true); const checkedIds = ref([]); - const showModal = ref(false); - const formParams = ref(); const actionColumn = reactive({ width: 300, @@ -170,15 +166,6 @@ return await List({ ...searchFormRef.value?.formModel, ...res }); }; - function addTable() { - showModal.value = true; - formParams.value = newState(null); - } - - function updateShowModal(value) { - showModal.value = value; - } - function onCheckedRow(rowKeys) { batchDeleteDisabled.value = rowKeys.length <= 0; checkedIds.value = rowKeys; @@ -188,13 +175,16 @@ actionRef.value.reload(); } - function handleView(record: Recordable) { - router.push({ name: 'curdDemoView', params: { id: record.id } }); + function addTable() { + editRef.value.openModal(null); } function handleEdit(record: Recordable) { - showModal.value = true; - formParams.value = newState(record as State); + editRef.value.openModal(record); + } + + function handleView(record: Recordable) { + viewRef.value.openModal(record); } function handleDelete(record: Recordable) { @@ -209,9 +199,6 @@ reloadTable(); }); }, - onNegativeClick: () => { - // message.error('取消'); - }, }); } @@ -229,9 +216,6 @@ reloadTable(); }); }, - onNegativeClick: () => { - // message.error('取消'); - }, }); } diff --git a/web/src/views/curdDemo/model.ts b/web/src/views/curdDemo/model.ts index df475dd..0539aa4 100644 --- a/web/src/views/curdDemo/model.ts +++ b/web/src/views/curdDemo/model.ts @@ -8,59 +8,46 @@ import { isArray, isNullObject } from '@/utils/is'; import { getFileExt } from '@/utils/urlUtils'; import { defRangeShortcuts, defShortcuts, formatToDate } from '@/utils/dateUtil'; import { validate } from '@/utils/validateUtil'; -import { getOptionLabel, getOptionTag, Options, errorImg } from '@/utils/hotgo'; +import { getOptionLabel, getOptionTag, Option, Options, errorImg } from '@/utils/hotgo'; import { usePermission } from '@/hooks/web/usePermission'; const { hasPermission } = usePermission(); const $message = window['$message']; - -export interface State { - id: number; - categoryId: number; - title: string; - description: string; - content: string; - image: string; - attachfile: string; - cityId: number; - switch: number; - sort: number; - status: number; - createdBy: number; - updatedBy: number; - createdAt: string; - updatedAt: string; - deletedAt: string; +export class State { + public id = 0; // ID + public categoryId = 0; // 分类ID + public title = ''; // 标题 + public description = ''; // 描述 + public content = ''; // 内容 + public image = ''; // 单图 + public attachfile = ''; // 附件 + public cityId = 0; // 所在城市 + public switch = 1; // 显示开关 + public sort = 0; // 排序 + public status = 1; // 状态 + public createdBy = 0; // 创建者 + public updatedBy = 0; // 更新者 + public createdAt = ''; // 创建时间 + public updatedAt = ''; // 修改时间 + public deletedAt = ''; // 删除时间 } -export const defaultState: State = { - id: 0, - categoryId: 0, - title: '', - description: '', - content: '', - image: '', - attachfile: '', - cityId: 0, - switch: 1, - sort: 0, - status: 1, - createdBy: 0, - updatedBy: 0, - createdAt: '', - updatedAt: '', - deletedAt: '', +export function newState(state: State | Record | null): State { + if (state !== null) { + if (state instanceof State) { + return cloneDeep(state); + } + return new State(state); + } + return new State(); +} + +export interface IOptions extends Options { + sys_normal_disable: Option[]; }; -export function newState(state: State | null): State { - if (state !== null) { - return cloneDeep(state); - } - return cloneDeep(defaultState); -} - -export const options = ref({ +export const options = ref({ sys_normal_disable: [], }); diff --git a/web/src/views/curdDemo/view.vue b/web/src/views/curdDemo/view.vue index 7d58052..250ba8c 100644 --- a/web/src/views/curdDemo/view.vue +++ b/web/src/views/curdDemo/view.vue @@ -1,11 +1,14 @@ diff --git a/web/src/views/develop/code/components/BaseInfo.vue b/web/src/views/develop/code/components/BaseInfo.vue index bc924ed..5d67f26 100644 --- a/web/src/views/develop/code/components/BaseInfo.vue +++ b/web/src/views/develop/code/components/BaseInfo.vue @@ -234,7 +234,7 @@ 关联表数量建议在三个以下 - +
diff --git a/web/src/views/org/user/list.vue b/web/src/views/org/user/list.vue index 995fe93..fce1b71 100644 --- a/web/src/views/org/user/list.vue +++ b/web/src/views/org/user/list.vue @@ -69,6 +69,7 @@ - +