Commit baae587b4a9308f793d024d1914b78d76047119c

Authored by zhangdaiscott
1 parent e5e754f0

vue3代码生成器模板优化

Showing 14 changed files with 302 additions and 68 deletions
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei
... ... @@ -94,6 +94,9 @@
94 94 import { getAuthCache, setAuthCache } from '/@/utils/auth';
95 95 import { DB_DICT_DATA_KEY } from '/@/enums/cacheEnum';
96 96 </#if>
  97 + <#if bpm_flag==true>
  98 + import { startProcess } from '/@/api/common/api';
  99 + </#if>
97 100 // 展开key
98 101 const expandedRowKeys = ref<any[]>([]);
99 102 //注册model
... ... @@ -218,23 +221,66 @@
218 221 }
219 222 ]
220 223 }
221   - /**
222   - * 下拉操作栏
223   - */
  224 +
  225 + <#if bpm_flag==true>
  226 + /**
  227 + * 提交流程
  228 + */
  229 + async function handleProcess(record) {
  230 + let params = {
  231 + flowCode: 'dev_${tableName}_001',
  232 + id: record.id,
  233 + formUrl: '${entityPackage}/modules/${entityName}Form',
  234 + formUrlMobile: ''
  235 + }
  236 + await startProcess(params);
  237 + handleSuccess();
  238 + }
  239 + </#if>
  240 +
  241 + /**
  242 + * 下拉操作栏
  243 + */
224 244 function getDropDownAction(record){
225   - return [
226   - {
227   - label: '详情',
228   - onClick: handleDetail.bind(null, record),
229   - }, {
230   - label: '删除',
231   - popConfirm: {
232   - title: '是否确认删除',
233   - confirm: handleDelete.bind(null, record),
234   - }
235   - }
236   - ]
237   - }
  245 + <#if bpm_flag==true>
  246 + let dropDownAction = [
  247 + {
  248 + label: '详情',
  249 + onClick: handleDetail.bind(null, record),
  250 + }, {
  251 + label: '删除',
  252 + popConfirm: {
  253 + title: '是否确认删除',
  254 + confirm: handleDelete.bind(null, record),
  255 + }
  256 + }
  257 + ];
  258 + if(record.bpmStatus == '1'){
  259 + dropDownAction.push({
  260 + label: '发起流程',
  261 + popConfirm: {
  262 + title: '确认提交流程吗?',
  263 + confirm: handleProcess.bind(null, record),
  264 + }
  265 + })
  266 + }
  267 + return dropDownAction;
  268 + <#else>
  269 + return [
  270 + {
  271 + label: '详情',
  272 + onClick: handleDetail.bind(null, record),
  273 + }, {
  274 + label: '删除',
  275 + popConfirm: {
  276 + title: '是否确认删除',
  277 + confirm: handleDelete.bind(null, record),
  278 + }
  279 + }
  280 + ]
  281 + </#if>
  282 + }
  283 +
238 284 <#if list_need_category>
239 285 /**
240 286 * 初始化字典配置
... ...
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__api.tsi
1 1 import {defHttp} from '/@/utils/http/axios';
2   -import {Modal} from 'ant-design-vue';
  2 +import { useMessage } from "/@/hooks/web/useMessage";
  3 +
  4 +const { createConfirm } = useMessage();
3 5  
4 6 enum Api {
5 7 list = '/${entityPackage}/${entityName?uncap_first}/list',
... ... @@ -50,7 +52,8 @@ export const deleteOne = (params,handleSuccess) =&gt; {
50 52 * @param params
51 53 */
52 54 export const batchDelete = (params, handleSuccess) => {
53   - Modal.confirm({
  55 + createConfirm({
  56 + iconType: 'warning',
54 57 title: '确认删除',
55 58 content: '是否删除选中数据',
56 59 okText: '确认',
... ...
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi
... ... @@ -123,7 +123,8 @@ export const searchFormSchema: FormSchema[] = [
123 123 <#elseif po.classType=='datetime'>
124 124 component: 'DatePicker',
125 125 componentProps: {
126   - showTime:true
  126 + showTime:true,
  127 + valueFormat: 'YYYY-MM-DD HH:mm:ss'
127 128 },
128 129 <#elseif po.classType=='pca'>
129 130 component: 'JAreaLinkage',
... ... @@ -190,6 +191,15 @@ export const formSchema: FormSchema[] = [
190 191 {
191 192 label: '${po.filedComment}',
192 193 field: ${autoStringSuffix(po)},
  194 +<#-- update-begin-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
  195 + <#if po.defaultVal??>
  196 + <#if po.fieldDbType=="BigDecimal" || po.fieldDbType=="double" || po.fieldDbType=="int">
  197 + defaultValue: ${po.defaultVal},
  198 + <#else>
  199 + defaultValue: "${po.defaultVal}",
  200 + </#if>
  201 + </#if>
  202 +<#-- update-end-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
193 203 <#if po.classType =='date'>
194 204 component: 'DatePicker',
195 205 <#elseif po.classType =='datetime'>
... ... @@ -321,7 +331,7 @@ export const formSchema: FormSchema[] = [
321 331 { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'},
322 332 <#-- 邮政编码 -->
323 333 <#elseif fieldValidType == 'p'>
324   - { pattern: /^[1-9]\d{5}$/, message: '请输入正确的邮政编码!'},
  334 + { pattern: /^[0-9]\d{5}$/, message: '请输入正确的邮政编码!'},
325 335 <#-- 字母 -->
326 336 <#elseif fieldValidType == 's'>
327 337 { pattern: /^[A-Z|a-z]+$/, message: '请输入字母!'},
... ... @@ -449,6 +459,15 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
449 459 {
450 460 label: '${po.filedComment}',
451 461 field: ${autoStringSuffix(po)},
  462 +<#-- update-begin-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
  463 + <#if po.defaultVal??>
  464 + <#if po.fieldDbType=="BigDecimal" || po.fieldDbType=="double" || po.fieldDbType=="int">
  465 + defaultValue: ${po.defaultVal},
  466 + <#else>
  467 + defaultValue: "${po.defaultVal}",
  468 + </#if>
  469 + </#if>
  470 +<#-- update-end-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
452 471 <#if po.classType =='date'>
453 472 component: 'DatePicker',
454 473 <#elseif po.classType =='datetime'>
... ... @@ -580,7 +599,7 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
580 599 { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'},
581 600 <#-- 邮政编码 -->
582 601 <#elseif fieldValidType == 'p'>
583   - { pattern: /^[1-9]\d{5}$/, message: '请输入正确的邮政编码!'},
  602 + { pattern: /^[0-9]\d{5}$/, message: '请输入正确的邮政编码!'},
584 603 <#-- 字母 -->
585 604 <#elseif fieldValidType == 's'>
586 605 { pattern: /^[A-Z|a-z]+$/, message: '请输入字母!'},
... ...
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei
... ... @@ -77,6 +77,9 @@
77 77 import { getAuthCache, setAuthCache } from '/@/utils/auth';
78 78 import { DB_DICT_DATA_KEY } from '/@/enums/cacheEnum';
79 79 </#if>
  80 + <#if bpm_flag==true>
  81 + import { startProcess } from '/@/api/common/api';
  82 + </#if>
80 83 const checkedKeys = ref<Array<string | number>>([]);
81 84 //注册model
82 85 const [registerModal, {openModal}] = useModal();
... ... @@ -192,23 +195,66 @@
192 195 }
193 196 ]
194 197 }
195   - /**
196   - * 下拉操作栏
197   - */
  198 +
  199 + <#if bpm_flag==true>
  200 + /**
  201 + * 提交流程
  202 + */
  203 + async function handleProcess(record) {
  204 + let params = {
  205 + flowCode: 'dev_${tableName}_001',
  206 + id: record.id,
  207 + formUrl: '${entityPackage}/modules/${entityName}Form',
  208 + formUrlMobile: ''
  209 + }
  210 + await startProcess(params);
  211 + handleSuccess();
  212 + }
  213 + </#if>
  214 +
  215 + /**
  216 + * 下拉操作栏
  217 + */
198 218 function getDropDownAction(record){
199   - return [
200   - {
201   - label: '详情',
202   - onClick: handleDetail.bind(null, record),
203   - }, {
204   - label: '删除',
205   - popConfirm: {
206   - title: '是否确认删除',
207   - confirm: handleDelete.bind(null, record),
208   - }
209   - }
210   - ]
211   - }
  219 + <#if bpm_flag==true>
  220 + let dropDownAction = [
  221 + {
  222 + label: '详情',
  223 + onClick: handleDetail.bind(null, record),
  224 + }, {
  225 + label: '删除',
  226 + popConfirm: {
  227 + title: '是否确认删除',
  228 + confirm: handleDelete.bind(null, record),
  229 + }
  230 + }
  231 + ];
  232 + if(record.bpmStatus == '1'){
  233 + dropDownAction.push({
  234 + label: '发起流程',
  235 + popConfirm: {
  236 + title: '确认提交流程吗?',
  237 + confirm: handleProcess.bind(null, record),
  238 + }
  239 + })
  240 + }
  241 + return dropDownAction;
  242 + <#else>
  243 + return [
  244 + {
  245 + label: '详情',
  246 + onClick: handleDetail.bind(null, record),
  247 + }, {
  248 + label: '删除',
  249 + popConfirm: {
  250 + title: '是否确认删除',
  251 + confirm: handleDelete.bind(null, record),
  252 + }
  253 + }
  254 + ]
  255 + </#if>
  256 + }
  257 +
212 258 <#if list_need_category>
213 259 /**
214 260 * 初始化字典配置
... ...
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__api.tsi
1 1 import {defHttp} from '/@/utils/http/axios';
2   -import {Modal} from 'ant-design-vue';
  2 +import { useMessage } from "/@/hooks/web/useMessage";
  3 +
  4 +const { createConfirm } = useMessage();
3 5  
4 6 enum Api {
5 7 list = '/${entityPackage}/${entityName?uncap_first}/list',
... ... @@ -50,7 +52,8 @@ export const deleteOne = (params,handleSuccess) =&gt; {
50 52 * @param params
51 53 */
52 54 export const batchDelete = (params, handleSuccess) => {
53   - Modal.confirm({
  55 + createConfirm({
  56 + iconType: 'warning',
54 57 title: '确认删除',
55 58 content: '是否删除选中数据',
56 59 okText: '确认',
... ...
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi
... ... @@ -123,7 +123,8 @@ export const searchFormSchema: FormSchema[] = [
123 123 <#elseif po.classType=='datetime'>
124 124 component: 'DatePicker',
125 125 componentProps: {
126   - showTime:true
  126 + showTime:true,
  127 + valueFormat: 'YYYY-MM-DD HH:mm:ss'
127 128 },
128 129 <#elseif po.classType=='pca'>
129 130 component: 'JAreaLinkage',
... ... @@ -190,6 +191,15 @@ export const formSchema: FormSchema[] = [
190 191 {
191 192 label: '${po.filedComment}',
192 193 field: ${autoStringSuffix(po)},
  194 +<#-- update-begin-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
  195 + <#if po.defaultVal??>
  196 + <#if po.fieldDbType=="BigDecimal" || po.fieldDbType=="double" || po.fieldDbType=="int">
  197 + defaultValue: ${po.defaultVal},
  198 + <#else>
  199 + defaultValue: "${po.defaultVal}",
  200 + </#if>
  201 + </#if>
  202 +<#-- update-end-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
193 203 <#if po.classType =='date'>
194 204 component: 'DatePicker',
195 205 <#elseif po.classType =='datetime'>
... ... @@ -321,7 +331,7 @@ export const formSchema: FormSchema[] = [
321 331 { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'},
322 332 <#-- 邮政编码 -->
323 333 <#elseif fieldValidType == 'p'>
324   - { pattern: /^[1-9]\d{5}$/, message: '请输入正确的邮政编码!'},
  334 + { pattern: /^[0-9]\d{5}$/, message: '请输入正确的邮政编码!'},
325 335 <#-- 字母 -->
326 336 <#elseif fieldValidType == 's'>
327 337 { pattern: /^[A-Z|a-z]+$/, message: '请输入字母!'},
... ... @@ -386,6 +396,15 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
386 396 {
387 397 label: '${po.filedComment}',
388 398 field: ${autoStringSuffix(po)},
  399 +<#-- update-begin-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
  400 + <#if po.defaultVal??>
  401 + <#if po.fieldDbType=="BigDecimal" || po.fieldDbType=="double" || po.fieldDbType=="int">
  402 + defaultValue: ${po.defaultVal},
  403 + <#else>
  404 + defaultValue: "${po.defaultVal}",
  405 + </#if>
  406 + </#if>
  407 +<#-- update-end-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
389 408 <#if po.classType =='date'>
390 409 component: 'DatePicker',
391 410 <#elseif po.classType =='datetime'>
... ... @@ -517,7 +536,7 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
517 536 { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'},
518 537 <#-- 邮政编码 -->
519 538 <#elseif fieldValidType == 'p'>
520   - { pattern: /^[1-9]\d{5}$/, message: '请输入正确的邮政编码!'},
  539 + { pattern: /^[0-9]\d{5}$/, message: '请输入正确的邮政编码!'},
521 540 <#-- 字母 -->
522 541 <#elseif fieldValidType == 's'>
523 542 { pattern: /^[A-Z|a-z]+$/, message: '请输入字母!'},
... ...
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}List.vuei
... ... @@ -18,6 +18,7 @@
18 18 <#assign need_image_upload = false>
19 19 <#assign need_editor = false>
20 20 <#assign need_checkbox = false>
  21 + <#assign query_flag = false>
21 22 <!--查询区域-->
22 23 <div class="jeecg-basic-table-form-container">
23 24 <a-form @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
... ... @@ -27,6 +28,9 @@
27 28 <#if po.fieldDbName=='bpm_status'>
28 29 <#assign bpm_flag=true>
29 30 </#if>
  31 + <#if po.isQuery=='Y'>
  32 + <#assign query_flag=true>
  33 + </#if>
30 34 <#if po.classType=='cat_tree' && po.dictText?default("")?trim?length == 0>
31 35 <#assign need_category=true>
32 36 </#if>
... ...
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__api.tsi
1 1 import {defHttp} from '/@/utils/http/axios';
2   -import {Modal} from 'ant-design-vue';
  2 +import { useMessage } from "/@/hooks/web/useMessage";
  3 +
  4 +const { createConfirm } = useMessage();
3 5  
4 6 enum Api {
5 7 list = '/${entityPackage}/${entityName?uncap_first}/list',
... ... @@ -53,7 +55,8 @@ export const deleteOne = (params,handleSuccess) =&gt; {
53 55 * @param params
54 56 */
55 57 export const batchDelete = (params, handleSuccess) => {
56   - Modal.confirm({
  58 + createConfirm({
  59 + iconType: 'warning',
57 60 title: '确认删除',
58 61 content: '是否删除选中数据',
59 62 okText: '确认',
... ...
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/${entityName}__data.tsi
... ... @@ -122,7 +122,8 @@ export const searchFormSchema: FormSchema[] = [
122 122 <#elseif po.classType=='datetime'>
123 123 component: 'DatePicker',
124 124 componentProps: {
125   - showTime:true
  125 + showTime:true,
  126 + valueFormat: 'YYYY-MM-DD HH:mm:ss'
126 127 },
127 128 <#elseif po.classType=='pca'>
128 129 component: 'JAreaLinkage',
... ... @@ -320,7 +321,7 @@ export const formSchema: FormSchema[] = [
320 321 { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'},
321 322 <#-- 邮政编码 -->
322 323 <#elseif fieldValidType == 'p'>
323   - { pattern: /^[1-9]\d{5}$/, message: '请输入正确的邮政编码!'},
  324 + { pattern: /^[0-9]\d{5}$/, message: '请输入正确的邮政编码!'},
324 325 <#-- 字母 -->
325 326 <#elseif fieldValidType == 's'>
326 327 { pattern: /^[A-Z|a-z]+$/, message: '请输入字母!'},
... ... @@ -516,7 +517,7 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
516 517 { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'},
517 518 <#-- 邮政编码 -->
518 519 <#elseif fieldValidType == 'p'>
519   - { pattern: /^[1-9]\d{5}$/, message: '请输入正确的邮政编码!'},
  520 + { pattern: /^[0-9]\d{5}$/, message: '请输入正确的邮政编码!'},
520 521 <#-- 字母 -->
521 522 <#elseif fieldValidType == 's'>
522 523 { pattern: /^[A-Z|a-z]+$/, message: '请输入字母!'},
... ...
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/${entityName}Form.vuei
... ... @@ -137,6 +137,7 @@
137 137 </#list>
138 138 const activeKey = ref('${subTabActiveKey}');
139 139 const formData = reactive<Record<string, any>>({
  140 + id: '',
140 141 <#list columns as po>
141 142 <#if po.isShow == 'Y'>
142 143 ${po.fieldName}: '',
... ... @@ -229,6 +230,15 @@
229 230 }
230 231 }
231 232  
  233 + /**
  234 + * 值改变事件触发-树控件回调
  235 + * @param key
  236 + * @param value
  237 + */
  238 + function handleFormChange(key, value) {
  239 + formData[key] = value;
  240 + }
  241 +
232 242 <#list columns as po>
233 243 <#if po.isShow == 'Y' && po.fieldValidType?default("") == 'only'>
234 244 async function ${po.fieldName}Duplicatevalidate(_r, value) {
... ... @@ -252,6 +262,7 @@
252 262 loading,
253 263 formData,
254 264 setFieldsValue,
  265 + handleFormChange,
255 266 formItemLayout,
256 267 formDisabled,
257 268 getFormData,
... ...
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3Native/components/[1-n]Form.vuei
... ... @@ -74,6 +74,7 @@
74 74 const isForm = true;
75 75 const loading = ref(false);
76 76 const formData = reactive<Record<string, any>>({
  77 + id: '',
77 78 <#list sub.colums as po>
78 79 <#if po.isShow == 'Y'>
79 80 ${po.fieldName}: '',
... ... @@ -124,6 +125,15 @@
124 125 }
125 126 }
126 127  
  128 + /**
  129 + * 值改变事件触发-树控件回调
  130 + * @param key
  131 + * @param value
  132 + */
  133 + function handleFormChange(key, value) {
  134 + formData[key] = value;
  135 + }
  136 +
127 137 <#list sub.colums as po>
128 138 <#if po.isShow == 'Y' && po.fieldValidType?default("") == 'only'>
129 139 async function ${po.fieldName}Duplicatevalidate(_r, value) {
... ... @@ -139,6 +149,7 @@
139 149 initFormData,
140 150 getFormData,
141 151 setFieldsValue,
  152 + handleFormChange,
142 153 isForm,
143 154 validateInfos
144 155 }
... ...
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei
... ... @@ -77,6 +77,9 @@
77 77 import { getAuthCache, setAuthCache } from '/@/utils/auth';
78 78 import { DB_DICT_DATA_KEY } from '/@/enums/cacheEnum';
79 79 </#if>
  80 + <#if bpm_flag==true>
  81 + import { startProcess } from '/@/api/common/api';
  82 + </#if>
80 83 const checkedKeys = ref<Array<string | number>>([]);
81 84 //注册model
82 85 const [registerModal, {openModal}] = useModal();
... ... @@ -192,23 +195,66 @@
192 195 }
193 196 ]
194 197 }
195   - /**
196   - * 下拉操作栏
197   - */
  198 +
  199 + <#if bpm_flag==true>
  200 + /**
  201 + * 提交流程
  202 + */
  203 + async function handleProcess(record) {
  204 + let params = {
  205 + flowCode: 'dev_${tableName}_001',
  206 + id: record.id,
  207 + formUrl: '${entityPackage}/modules/${entityName}Form',
  208 + formUrlMobile: ''
  209 + }
  210 + await startProcess(params);
  211 + handleSuccess();
  212 + }
  213 + </#if>
  214 +
  215 + /**
  216 + * 下拉操作栏
  217 + */
198 218 function getDropDownAction(record){
199   - return [
200   - {
201   - label: '详情',
202   - onClick: handleDetail.bind(null, record),
203   - }, {
204   - label: '删除',
205   - popConfirm: {
206   - title: '是否确认删除',
207   - confirm: handleDelete.bind(null, record),
208   - }
209   - }
210   - ]
211   - }
  219 + <#if bpm_flag==true>
  220 + let dropDownAction = [
  221 + {
  222 + label: '详情',
  223 + onClick: handleDetail.bind(null, record),
  224 + }, {
  225 + label: '删除',
  226 + popConfirm: {
  227 + title: '是否确认删除',
  228 + confirm: handleDelete.bind(null, record),
  229 + }
  230 + }
  231 + ];
  232 + if(record.bpmStatus == '1'){
  233 + dropDownAction.push({
  234 + label: '发起流程',
  235 + popConfirm: {
  236 + title: '确认提交流程吗?',
  237 + confirm: handleProcess.bind(null, record),
  238 + }
  239 + })
  240 + }
  241 + return dropDownAction;
  242 + <#else>
  243 + return [
  244 + {
  245 + label: '详情',
  246 + onClick: handleDetail.bind(null, record),
  247 + }, {
  248 + label: '删除',
  249 + popConfirm: {
  250 + title: '是否确认删除',
  251 + confirm: handleDelete.bind(null, record),
  252 + }
  253 + }
  254 + ]
  255 + </#if>
  256 + }
  257 +
212 258 <#if list_need_category>
213 259 /**
214 260 * 初始化字典配置
... ...
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__api.tsi
1 1 import {defHttp} from '/@/utils/http/axios';
2   -import {Modal} from 'ant-design-vue';
  2 +import { useMessage } from "/@/hooks/web/useMessage";
  3 +
  4 +const { createConfirm } = useMessage();
3 5  
4 6 enum Api {
5 7 list = '/${entityPackage}/${entityName?uncap_first}/list',
... ... @@ -50,7 +52,8 @@ export const deleteOne = (params,handleSuccess) =&gt; {
50 52 * @param params
51 53 */
52 54 export const batchDelete = (params, handleSuccess) => {
53   - Modal.confirm({
  55 + createConfirm({
  56 + iconType: 'warning',
54 57 title: '确认删除',
55 58 content: '是否删除选中数据',
56 59 okText: '确认',
... ...
jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi
... ... @@ -123,7 +123,8 @@ export const searchFormSchema: FormSchema[] = [
123 123 <#elseif po.classType=='datetime'>
124 124 component: 'DatePicker',
125 125 componentProps: {
126   - showTime:true
  126 + showTime:true,
  127 + valueFormat: 'YYYY-MM-DD HH:mm:ss'
127 128 },
128 129 <#elseif po.classType=='pca'>
129 130 component: 'JAreaLinkage',
... ... @@ -190,6 +191,15 @@ export const formSchema: FormSchema[] = [
190 191 {
191 192 label: '${po.filedComment}',
192 193 field: ${autoStringSuffix(po)},
  194 +<#-- update-begin-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
  195 + <#if po.defaultVal??>
  196 + <#if po.fieldDbType=="BigDecimal" || po.fieldDbType=="double" || po.fieldDbType=="int">
  197 + defaultValue: ${po.defaultVal},
  198 + <#else>
  199 + defaultValue: "${po.defaultVal}",
  200 + </#if>
  201 + </#if>
  202 +<#-- update-end-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
193 203 <#if po.classType =='date'>
194 204 component: 'DatePicker',
195 205 <#elseif po.classType =='datetime'>
... ... @@ -318,7 +328,7 @@ export const formSchema: FormSchema[] = [
318 328 { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'},
319 329 <#-- 邮政编码 -->
320 330 <#elseif fieldValidType == 'p'>
321   - { pattern: /^[1-9]\d{5}$/, message: '请输入正确的邮政编码!'},
  331 + { pattern: /^[0-9]\d{5}$/, message: '请输入正确的邮政编码!'},
322 332 <#-- 字母 -->
323 333 <#elseif fieldValidType == 's'>
324 334 { pattern: /^[A-Z|a-z]+$/, message: '请输入字母!'},
... ... @@ -383,6 +393,15 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
383 393 {
384 394 label: '${po.filedComment}',
385 395 field: ${autoStringSuffix(po)},
  396 +<#-- update-begin-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
  397 + <#if po.defaultVal??>
  398 + <#if po.fieldDbType=="BigDecimal" || po.fieldDbType=="double" || po.fieldDbType=="int">
  399 + defaultValue: ${po.defaultVal},
  400 + <#else>
  401 + defaultValue: "${po.defaultVal}",
  402 + </#if>
  403 + </#if>
  404 +<#-- update-end-author:taoyan date:2022-6-24 for: VUEN-1190【代码生成】默认值未生成 -->
386 405 <#if po.classType =='date'>
387 406 component: 'DatePicker',
388 407 <#elseif po.classType =='datetime'>
... ... @@ -511,7 +530,7 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
511 530 { pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号码!'},
512 531 <#-- 邮政编码 -->
513 532 <#elseif fieldValidType == 'p'>
514   - { pattern: /^[1-9]\d{5}$/, message: '请输入正确的邮政编码!'},
  533 + { pattern: /^[0-9]\d{5}$/, message: '请输入正确的邮政编码!'},
515 534 <#-- 字母 -->
516 535 <#elseif fieldValidType == 's'>
517 536 { pattern: /^[A-Z|a-z]+$/, message: '请输入字母!'},
... ...