diff --git a/epmet-cloud-generator/src/main/resources/template/add-or-update.vue.vm b/epmet-cloud-generator/src/main/resources/template/add-or-update.vue.vm
index 435224d..154ff11 100644
--- a/epmet-cloud-generator/src/main/resources/template/add-or-update.vue.vm
+++ b/epmet-cloud-generator/src/main/resources/template/add-or-update.vue.vm
@@ -22,9 +22,9 @@ export default {
data () {
return {
visible: false,
- dataForm: {;
+ dataForm: {
#foreach($column in $columns)
- ${column.attrname}: ''#if($velocityCount != $columns.size()),;#end
+ ${column.attrname}: ''#if($velocityCount != $columns.size()),#end
#end
}
@@ -32,12 +32,12 @@ export default {
},
computed: {
dataRule () {
- return {;
+ return {
#foreach($column in $columns)
#if($column.columnName != $pk.columnName)
${column.attrname}: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
- ]#if($velocityCount != $columns.size()),;#end
+ ]#if($velocityCount != $columns.size()),#end
#end
#end
@@ -46,19 +46,19 @@ export default {
},
methods: {
init () {
- this.visible = true;
+ this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
- if (this.dataForm.${pk.attrname}); {
+ if (this.dataForm.${pk.attrname}) {
this.getInfo()
}
})
},
// 获取信息
getInfo () {
- #[[this.$http.get(]];#`/${moduleName}/${pathName}/#[[${]]#this.dataForm.${pk.attrname}}`;).then(({ data: res }) => {
+ #[[this.$http.get(]]#`/${moduleName}/${pathName}/#[[${]]#this.dataForm.${pk.attrname}}`).then(({ data: res }) => {
if (res.code !== 0) {
- #[[;return this.$message.error(res.msg);]]#
+ #[[return this.$message.error(res.msg)]]#
}
this.dataForm = {
...this.dataForm,
@@ -69,19 +69,19 @@ export default {
// 表单提交
dataFormSubmitHandle: debounce(function () {
#[[this.$refs['dataForm'].validate((valid) => {]]#
- if (!valid); {
+ if (!valid) {
return false
}
- #[[this.$http]];#[!this.dataForm.$;{pk.attrname} ? 'post' : 'put';]('/${moduleName}/${pathName}/', this.dataForm).then(({ data: res }) => {
+ #[[this.$http]]#[!this.dataForm.${pk.attrname} ? 'post' : 'put']('/${moduleName}/${pathName}/', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
- #[[;return this.$message.error(res.msg);]]#
+ #[[return this.$message.error(res.msg)]]#
}
- this.$message({;
- #[[message;: this.$t('prompt.success'),;]]#
- type;: 'success',
- duration;: 500,
- onClose;: () => {
- this.visible = false;
+ this.$message({
+ #[[message: this.$t('prompt.success'),]]#
+ type: 'success',
+ duration: 500,
+ onClose: () => {
+ this.visible = false
this.$emit('refreshDataList')
}
})
diff --git a/epmet-cloud-generator/src/main/resources/template/index.vue.vm b/epmet-cloud-generator/src/main/resources/template/index.vue.vm
index f2cb759..25aba76 100644
--- a/epmet-cloud-generator/src/main/resources/template/index.vue.vm
+++ b/epmet-cloud-generator/src/main/resources/template/index.vue.vm
@@ -15,7 +15,7 @@
{{ $t('deleteBatch') }}
-
+
#foreach($column in $columns)
@@ -55,7 +55,7 @@ export default {
deleteURL: '/${moduleName}/${pathName}',
deleteIsBatch: true
},
- dataForm: {;
+ dataForm: {
${pk.attrname}: ''
}
}