diff --git a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationLine.java b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationLine.java index 90c69fb..41e4e85 100644 --- a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationLine.java +++ b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationLine.java @@ -118,7 +118,7 @@ public class TheRapyRecuperationLine extends BaseModel { private Integer estimatedFamilyNumbers; @Column - @ColDefine(type = ColType.VARCHAR, width = 30) + @ColDefine(type = ColType.MYSQL_JSON) @Comment("缩略图") private String files; diff --git a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationTravelAgency.java b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationTravelAgency.java index e5460ce..433875c 100644 --- a/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationTravelAgency.java +++ b/src/main/java/io/v/nutz/zhgh/therapyRecuperation/model/TheRapyRecuperationTravelAgency.java @@ -72,7 +72,7 @@ public class TheRapyRecuperationTravelAgency extends BaseModel { private boolean isDisabled; @Column - @ColDefine(type = ColType.VARCHAR, width = 100) + @ColDefine(type = ColType.MYSQL_JSON) @Comment("缩略图") private String files; diff --git a/src/main/resources/views/platform/theRapyRecuperation/basicManage/line.html b/src/main/resources/views/platform/theRapyRecuperation/basicManage/line.html index f395a4d..21f1d3d 100644 --- a/src/main/resources/views/platform/theRapyRecuperation/basicManage/line.html +++ b/src/main/resources/views/platform/theRapyRecuperation/basicManage/line.html @@ -726,6 +726,7 @@ layout("/layouts/platform.html"){ await this.$nextTick() const data = resp.data data.year = data.year.toString() + data.files = JSON.parse(data.files) this.formData = {...data} this.initLineContentEditor(data.content) } else { @@ -743,6 +744,7 @@ layout("/layouts/platform.html"){ background: 'rgba(0, 0, 0, 0.7)' }); delete this.formData.travelAgency + this.formData.files = JSON.stringify(this.formData.files) const resp = await $.post(loc() + '/doSubmit', this.formData) loading.close() if (resp.code === 0) { @@ -757,10 +759,12 @@ layout("/layouts/platform.html"){ } else { sublime.jumpPagePjax('/platform/theRapyRecuperation/lineFghSelect?mode=1') } - }).catch(() => { + })/*.catch(() => { this.$refs.guava.index() this.pageData() - }) + })*/ + this.$refs.guava.index() + this.pageData() } else { this.$message.warning(resp.msg) } diff --git a/src/main/resources/views/platform/theRapyRecuperation/basicManage/travelAgency.html b/src/main/resources/views/platform/theRapyRecuperation/basicManage/travelAgency.html index 897d0aa..3bd9d35 100644 --- a/src/main/resources/views/platform/theRapyRecuperation/basicManage/travelAgency.html +++ b/src/main/resources/views/platform/theRapyRecuperation/basicManage/travelAgency.html @@ -357,12 +357,14 @@ layout("/layouts/platform.html"){ async openEdit(row) { const cloneData = clone(row) cloneData.year = cloneData.year.toString() + cloneData.files = JSON.parse(cloneData.files) this.formData = {...cloneData} this.editDialogVisible = true }, async doSubmit() { const valid = await this.$refs['form'].validate() if (!valid) return + this.formData.files=JSON.stringify(this.formData.files) const resp = await $.post(loc() + '/doSubmit', {travelAgency: JSON.stringify(this.formData)}) if (resp.code === 0) { this.editDialogVisible = false