From 5abb4c60196557a1f6a8cc218bf02f6ffdeff652 Mon Sep 17 00:00:00 2001 From: lbw Date: Thu, 28 Apr 2022 01:39:40 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20Introducing=20new=20features.=20cl?= =?UTF-8?q?ose=20#3857=20=E3=80=90=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=E3=80=91=20=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20uview=20=E9=A3=8E=E6=A0=BC=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/2pigxx.sql | 1 + .../main/resources/mapper/SysUserMapper.xml | 3 + .../main/resources/template/uview/api.js.vm | 4 +- .../main/resources/template/uview/form.vue.vm | 4 +- .../resources/template/uview/index.vue.vm | 167 +++++++++--------- .../resources/template/uview/page.json.vm | 6 +- 6 files changed, 94 insertions(+), 91 deletions(-) diff --git a/db/2pigxx.sql b/db/2pigxx.sql index fcda295da..1e4da361f 100644 --- a/db/2pigxx.sql +++ b/db/2pigxx.sql @@ -257,6 +257,7 @@ INSERT INTO `sys_dict_item` VALUES (62, 15, 'MERGE_PAY', '聚合支付', 'channe INSERT INTO `sys_dict_item` VALUES (63, 2, 'CAS', 'CAS登录', 'social_type', 'CAS 单点登录系统', 3, ' ', ' ', '2022-02-18 13:56:25', '2022-02-18 13:56:28', NULL, '0', 1); INSERT INTO `sys_dict_item` VALUES (64, 2, 'DINGTALK', '钉钉', 'social_type', '钉钉', 3, ' ', ' ', '2022-02-18 13:56:25', '2022-02-18 13:56:28', NULL, '0', 1); INSERT INTO `sys_dict_item` VALUES (65, 2, 'WEIXIN_CP', '企业微信', 'social_type', '企业微信', 3, ' ', ' ', '2022-02-18 13:56:25', '2022-02-18 13:56:28', NULL, '0', 1); +INSERT INTO `sys_dict_item` VALUES (66, 18, '2', 'APP', 'style_type', 'uview风格', 1, ' ', ' ', '2020-02-07 03:53:12', '2020-02-07 03:53:12', '', '0', 1); COMMIT; -- ---------------------------- diff --git a/pigx-upms/pigx-upms-biz/src/main/resources/mapper/SysUserMapper.xml b/pigx-upms/pigx-upms-biz/src/main/resources/mapper/SysUserMapper.xml index 652be4aae..3e9bcf5da 100644 --- a/pigx-upms/pigx-upms-biz/src/main/resources/mapper/SysUserMapper.xml +++ b/pigx-upms/pigx-upms-biz/src/main/resources/mapper/SysUserMapper.xml @@ -110,6 +110,9 @@ u.del_flag, u.lock_flag, u.tenant_id, + u.nickname, + u.name, + u.email, u.create_time ucreate_time, u.update_time uupdate_time, r.role_id, diff --git a/pigx-visual/pigx-codegen/src/main/resources/template/uview/api.js.vm b/pigx-visual/pigx-codegen/src/main/resources/template/uview/api.js.vm index 16798df41..495dad858 100644 --- a/pigx-visual/pigx-codegen/src/main/resources/template/uview/api.js.vm +++ b/pigx-visual/pigx-codegen/src/main/resources/template/uview/api.js.vm @@ -10,9 +10,9 @@ pigx${className}: { #[[putObj: (obj={}) => vm.$u.put]]#('/${moduleName}/${pathName}',obj), // 删除 - #[[delObj: (id) => vm.$u.delete]]#('/${moduleName}/${pathName}/'+id), + #[[delObj: (params) => vm.$u.delete]]#('/${moduleName}/${pathName}/'+params.id), // 查询 - #[[getObj: (id) => vm.$u.get]]#('/${moduleName}/${pathName}/' + id) + #[[getObj: (params) => vm.$u.get]]#('/${moduleName}/${pathName}/' + params.id) } diff --git a/pigx-visual/pigx-codegen/src/main/resources/template/uview/form.vue.vm b/pigx-visual/pigx-codegen/src/main/resources/template/uview/form.vue.vm index 116fc394a..29eaada5e 100644 --- a/pigx-visual/pigx-codegen/src/main/resources/template/uview/form.vue.vm +++ b/pigx-visual/pigx-codegen/src/main/resources/template/uview/form.vue.vm @@ -43,9 +43,9 @@ } }, onLoad(params) { - if(params&¶ms.roleId){ + if(params&¶ms.id){ this.type = 'edit' - #[[this.$u.api]]#.pigx${className}.getObj(params.${pk.lowerAttrName}).then(res => { + #[[this.$u.api]]#.pigx${className}.getObj(params}).then(res => { Object.assign(this.model, res.data); }); }else{ diff --git a/pigx-visual/pigx-codegen/src/main/resources/template/uview/index.vue.vm b/pigx-visual/pigx-codegen/src/main/resources/template/uview/index.vue.vm index 4ab6cd599..c05d20156 100644 --- a/pigx-visual/pigx-codegen/src/main/resources/template/uview/index.vue.vm +++ b/pigx-visual/pigx-codegen/src/main/resources/template/uview/index.vue.vm @@ -2,84 +2,95 @@ - - - {{item.${pk.lowerAttrName}}} - - 创建时间: {{item.createTime}} - - - + + + #foreach($column in $columns) + + ${column.comments}: {{item.${column.lowerAttrName}}} + + #end + + + 编辑 + 删除 + + - + diff --git a/pigx-visual/pigx-codegen/src/main/resources/template/uview/page.json.vm b/pigx-visual/pigx-codegen/src/main/resources/template/uview/page.json.vm index 6ba4471b5..47a65c7f9 100644 --- a/pigx-visual/pigx-codegen/src/main/resources/template/uview/page.json.vm +++ b/pigx-visual/pigx-codegen/src/main/resources/template/uview/page.json.vm @@ -3,15 +3,15 @@ /**${comments}**/ { - "path": "pages/${moduleName}/${pathName}/${pathName}+'-index.vue'", + "path": "pages/${moduleName}/${pathName}/${pathName}-index.vue", "style": { "navigationBarTitleText": "${comments}" } }, { - "path": "pages/${moduleName}/${pathName}/${pathName}+'-form.vue'", + "path": "pages/${moduleName}/${pathName}/${pathName}-form.vue", "style": { "navigationBarTitleText": "${comments}详情" } } -} \ No newline at end of file +}