From 99f09efc0f7065402b1f1e8c0d798700e7543bac Mon Sep 17 00:00:00 2001 From: zhouhefeng Date: Tue, 25 Feb 2025 11:27:48 +0800 Subject: [PATCH] zhf --- .../zhgh/question/model/Question_wor.java | 7 ++++ .../resources/views/mobile/question/poll.html | 8 +++++ .../views/platform/question/question.html | 33 ++++++++++++------- 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/src/main/java/io/v/nutz/zhgh/question/model/Question_wor.java b/src/main/java/io/v/nutz/zhgh/question/model/Question_wor.java index d6ed20c..7b52a89 100644 --- a/src/main/java/io/v/nutz/zhgh/question/model/Question_wor.java +++ b/src/main/java/io/v/nutz/zhgh/question/model/Question_wor.java @@ -1,11 +1,13 @@ package io.v.nutz.zhgh.question.model; +import io.v.nutz.sys.models.Sys_file; import lombok.Data; import org.nutz.dao.entity.annotation.*; import org.nutz.dao.interceptor.annotation.PrevInsert; import org.nutz.integration.json4excel.annotation.J4EIgnore; import java.io.Serializable; +import java.util.List; /** * 问卷调查问题答案 @@ -89,6 +91,11 @@ public class Question_wor implements Serializable { @ColDefine(type = ColType.FLOAT) private Integer price; + @Column + @Comment("附件") + @ColDefine(type = ColType.MYSQL_JSON) + private List files; + @One(field = "wiid", key = "iid") private Question_issue issue; diff --git a/src/main/resources/views/mobile/question/poll.html b/src/main/resources/views/mobile/question/poll.html index bcc2c84..7ab2263 100644 --- a/src/main/resources/views/mobile/question/poll.html +++ b/src/main/resources/views/mobile/question/poll.html @@ -223,6 +223,11 @@ layout("/mobile/platform.html"){ {{ wor.wsm }} + +
+
{{file.filename}}
+
+
@@ -304,6 +309,9 @@ layout("/mobile/platform.html"){ } }, methods: { + fileClick(file){ + preview(file.filename, file.id) + }, async getQuestionData() { const resp = await $.get('/mobile/question/h5/questionInfo/' + this.id) this.questionData = resp.data diff --git a/src/main/resources/views/platform/question/question.html b/src/main/resources/views/platform/question/question.html index 45460a9..725e1e6 100644 --- a/src/main/resources/views/platform/question/question.html +++ b/src/main/resources/views/platform/question/question.html @@ -183,7 +183,8 @@ layout("/layouts/platform.html"){ 已关闭 - + - + +