Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	snowy-web-app/src/main/resources/application.properties
heguanxun 9 months ago
parent
commit
aada877a33

+ 1 - 1
snowy-admin-web/.env.development

@@ -5,7 +5,7 @@ NODE_ENV = development
 VITE_TITLE = yqyc
 
 # 接口地址
-VITE_API_BASEURL = http://127.0.0.1:18065
+VITE_API_BASEURL = http://127.0.0.1:18070
 
 # 本地端口
 VITE_PORT = 18066

+ 1 - 1
snowy-admin-web/.env.production

@@ -5,7 +5,7 @@ NODE_ENV = production
 VITE_TITLE = yqyc
 
 # 接口地址
-VITE_API_BASEURL = http://127.0.0.1:18065
+VITE_API_BASEURL = http://8.130.72.63:18070
 
 # 本地端口
 VITE_PORT = 18066

File diff suppressed because it is too large
+ 2 - 2
snowy-admin-web/index.html


+ 1 - 1
snowy-admin-web/package.json

@@ -1,5 +1,5 @@
 {
-	"name": "snowy-admin-web",
+	"name": "yqyc-web",
 	"version": "3.0.0",
 	"private": true,
 	"description": "小诺团队旗下Snowy前端,基于Antdv3.2+Vue3.2+Vite2.8",

+ 21 - 0
snowy-admin-web/src/views/gen/index.vue

@@ -27,6 +27,9 @@
 				<template v-if="column.dataIndex === 'generateType'">
 					{{ generateTypeFilter(record.generateType) }}
 				</template>
+				<template v-if="column.dataIndex === 'formMode'">
+					{{ formModeFilter(record.formMode) }}
+				</template>
 				<template v-if="column.dataIndex === 'action'">
 					<a @click="genPreviewRef.onOpen(record)">预览</a>
 					<a-divider type="vertical" />
@@ -96,6 +99,11 @@
 			ellipsis: true
 		},
 		{
+			title: '表单模式',
+			dataIndex: 'formMode',
+			ellipsis: true
+		},
+		{
 			title: '操作',
 			dataIndex: 'action',
 			align: 'center',
@@ -136,6 +144,19 @@
 		]
 		return array.find((f) => f.value === text).label
 	}
+	const formModeFilter = (text) => {
+		const array = [
+			{
+				label: '弹窗',
+				value: 'dialog'
+			},
+			{
+				label: '内嵌',
+				value: 'inside'
+			}
+		]
+		return array.find((f) => f.value === text)?.label || text
+	}
 	const tablePrefixFilter = (text) => {
 		const array = [
 			{

+ 1 - 0
snowy-admin-web/vite.config.mjs

@@ -58,6 +58,7 @@ export default defineConfig(({ command, mode }) => {
 		},
 		build: {
 			// sourcemap: true,
+			outDir: "yqyc-web",
 			manifest: true,
 			brotliSize: false,
 			rollupOptions: {

+ 5 - 0
snowy-plugin/snowy-plugin-gen/src/main/java/vip/xiaonuo/gen/modular/basic/param/GenBasicAddParam.java

@@ -108,4 +108,9 @@ public class GenBasicAddParam {
     /** 包名 */
     @Schema(description = "包名", requiredMode = Schema.RequiredMode.REQUIRED)
     private String packageName;
+
+    /** 表单模式 */
+    @Schema(description = "表单模式", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "formMode不能为空")
+    private String formMode;
 }

+ 6 - 1
snowy-plugin/snowy-plugin-gen/src/main/java/vip/xiaonuo/gen/modular/basic/param/GenBasicEditParam.java

@@ -112,6 +112,11 @@ public class GenBasicEditParam {
     private String authorName;
 
     /** 包名 */
-    @Schema(description = "包名 */", requiredMode = Schema.RequiredMode.REQUIRED)
+    @Schema(description = "包名", requiredMode = Schema.RequiredMode.REQUIRED)
     private String packageName;
+
+    /** 表单模式 */
+    @Schema(description = "表单模式", requiredMode = Schema.RequiredMode.REQUIRED)
+    @NotNull(message = "formMode不能为空")
+    private String formMode;
 }

+ 8 - 2
snowy-plugin/snowy-plugin-gen/src/main/resources/frontend/detail.vue.btl

@@ -1,12 +1,18 @@
 <template>
     <a-card :bordered="false">
 		<a-page-header
-			:title="formData.${configList[i].fieldNameCamelCase} ? '编辑${functionName}' : '增加${functionName}'"
+			<% for(var i = 0; i < configList.~size; i++) { %>
+            <% if(configList[i].needTableId) { %>
+            :title="formData.${configList[i].fieldNameCamelCase} ? '编辑${functionName}' : '增加${functionName}'"
+            <% } %>
+            <% } %>
 			@back="onClose"
 		>
 			<template #extra>
 				<a-button style="margin-right: 8px" @click="onClose">关闭</a-button>
-				<a-button type="primary" @click="onSubmit" :loading="submitLoading">保存</a-button>
+				<a-popconfirm title="请确认是否保存?" @confirm="onSubmit">
+                    <a-button type="primary" :loading="submitLoading">保存</a-button>
+                </a-popconfirm>
 			</template>
 		</a-page-header>
 		<a-form ref="formRef" :model="formData" :rules="formRules" layout="${formLayout}">

+ 3 - 1
snowy-plugin/snowy-plugin-gen/src/main/resources/frontend/form.vue.btl

@@ -83,7 +83,9 @@
 		</a-form>
 		<template #footer>
 			<a-button style="margin-right: 8px" @click="onClose">关闭</a-button>
-			<a-button type="primary" @click="onSubmit" :loading="submitLoading">保存</a-button>
+			<a-popconfirm title="请确认是否保存?" @confirm="onSubmit">
+                <a-button type="primary" :loading="submitLoading">保存</a-button>
+            </a-popconfirm>
 		</template>
 	</xn-form-container>
 </template>