mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-11 21:29:02 +08:00
Merge remote-tracking branch 'origin/fxz_dev' into leng_dev
This commit is contained in:
commit
16bbfa114a
6 files changed
+28
-23
No files matched your search
@@ -22,7 +22,7 @@
|
||||
<dynamic-ds.version>3.4.1</dynamic-ds.version>
|
||||
<druid.version>1.2.9</druid.version>
|
||||
<hutool.version>5.7.22</hutool.version>
|
||||
<mysql.connector.version>8.0.27</mysql.connector.version>
|
||||
<mysql.connector.version>8.0.29</mysql.connector.version>
|
||||
<oracle.version>21.3.0.0</oracle.version>
|
||||
<sqlserver.version>8.4.1.jre8</sqlserver.version>
|
||||
<dm.version>8.1.2.79</dm.version>
|
||||
|
||||
+14
-12
@@ -104,13 +104,6 @@ public class GenUtils {
|
||||
*/
|
||||
private List<String> getTemplates(GenConfig config) {
|
||||
List<String> templates = new ArrayList<>();
|
||||
templates.add("template/Entity.java.vm");
|
||||
templates.add("template/Mapper.java.vm");
|
||||
templates.add("template/Mapper.xml.vm");
|
||||
templates.add("template/Service.java.vm");
|
||||
templates.add("template/ServiceImpl.java.vm");
|
||||
templates.add("template/Controller.java.vm");
|
||||
templates.add("template/menu.sql.vm");
|
||||
|
||||
if (StyleTypeEnum.AVUE.getStyle().equals(config.getStyle())) {
|
||||
templates.add("template/avue/index.vue.vm");
|
||||
@@ -123,12 +116,20 @@ public class GenUtils {
|
||||
templates.add("template/avue/api.js.vm");
|
||||
}
|
||||
else {
|
||||
templates.add("template/uview/api.js.vm");
|
||||
templates.add("template/uview/form.vue.vm");
|
||||
templates.add("template/uview/index.vue.vm");
|
||||
templates.add("template/uview/form.vue.vm");
|
||||
templates.add("template/uview/api.js.vm");
|
||||
templates.add("template/uview/page.json.vm");
|
||||
}
|
||||
|
||||
templates.add("template/Entity.java.vm");
|
||||
templates.add("template/Mapper.java.vm");
|
||||
templates.add("template/Mapper.xml.vm");
|
||||
templates.add("template/Service.java.vm");
|
||||
templates.add("template/ServiceImpl.java.vm");
|
||||
templates.add("template/Controller.java.vm");
|
||||
templates.add("template/menu.sql.vm");
|
||||
|
||||
return templates;
|
||||
}
|
||||
|
||||
@@ -289,7 +290,7 @@ public class GenUtils {
|
||||
|
||||
// 获取模板列表
|
||||
List<String> templates = getTemplates(genConfig);
|
||||
Map<String, String> resultMap = new HashMap<>(8);
|
||||
Map<String, String> resultMap = new LinkedHashMap<>(8);
|
||||
|
||||
for (String template : templates) {
|
||||
// 如果是crud
|
||||
@@ -433,11 +434,12 @@ public class GenUtils {
|
||||
}
|
||||
|
||||
if (template.contains(UVIEW_API_JS_VM)) {
|
||||
return CommonConstants.UNI_END_PROJECT + File.separator + "common" + File.separator + "http.api.js";
|
||||
return CommonConstants.UNI_END_PROJECT + File.separator + "common" + File.separator
|
||||
+ className.toLowerCase() + ".api.js";
|
||||
}
|
||||
|
||||
if (template.contains(UVIEW_PAGE_JSON_VM)) {
|
||||
return "page.json";
|
||||
return className.toLowerCase() + ".page.json";
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -43,18 +43,19 @@
|
||||
}
|
||||
},
|
||||
onLoad(params) {
|
||||
if(params&¶ms.id){
|
||||
if(params&¶ms.id!= "undefined"){
|
||||
this.type = 'edit'
|
||||
#[[this.$u.api]]#.pigx${className}.getObj(params}).then(res => {
|
||||
Object.assign(this.model, res.data);
|
||||
#[[this.$u.api]]#.pigx${className}.getObj(params).then(res => {
|
||||
this.model = res.data;
|
||||
});
|
||||
}else{
|
||||
this.type = 'add'
|
||||
this.model = {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
#[[this.$refs.uForm.validate(valid => {]]#
|
||||
#[[this.$refs.uForm.validate(async valid => {]]#
|
||||
if (valid) {
|
||||
if(this.type==='edit'){
|
||||
await #[[this.$u.api]]#.pigx${className}.putObj(this.model)
|
||||
@@ -64,11 +65,13 @@
|
||||
setTimeout(() => {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '修改成功',
|
||||
ccontent: this.type === 'edit' ? '修改成功' : '添加成功',
|
||||
showCancel: false,
|
||||
success: function() {
|
||||
uni.setStorageSync('refreshList', true);
|
||||
uni.navigateBack();
|
||||
uni.navigateTo({
|
||||
url: '/pages/${moduleName}/${pathName}/${pathName}-index'
|
||||
})
|
||||
}
|
||||
})
|
||||
}, 200)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<u-loadmore :status="loadStatus"></u-loadmore>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="btn-plus" @click="navTo('form')">
|
||||
<view class="btn-plus" @click="cardClick()">
|
||||
<u-icon name="plus-circle-fill" size="90" color="#3d87ff"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
/**${comments}**/
|
||||
{
|
||||
"path": "pages/${moduleName}/${pathName}/${pathName}-index.vue",
|
||||
"path": "pages/${moduleName}/${pathName}/${pathName}-index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "${comments}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/${moduleName}/${pathName}/${pathName}-form.vue",
|
||||
"path": "pages/${moduleName}/${pathName}/${pathName}-form",
|
||||
"style": {
|
||||
"navigationBarTitleText": "${comments}详情"
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
<properties>
|
||||
<spring-boot.version>2.6.7</spring-boot.version>
|
||||
<spring-cloud.version>2021.0.1</spring-cloud.version>
|
||||
<spring-cloud.version>2021.0.2</spring-cloud.version>
|
||||
<spring-cloud-alibaba.version>2021.0.1.0</spring-cloud-alibaba.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
|
||||
Reference in new issue
Block a user