Browse Source

refactor(案例模块): 重构案例相关字段及接口路径

- 修改案例详情接口路径为/detail/{id}
- 重构案例相关字段定义,将客户相关字段改为设计相关字段
- 添加文件上传组件支持
- 移除评价人及职位字段
master
主管理员 3 weeks ago
parent
commit
b9f27d1d0c
5 changed files with 77 additions and 41 deletions
  1. +13
    -13
      java-api/ruoyi-modules/h-project/src/main/java/org/dromara/officialWebsite/domain/OwCases.java
  2. +5
    -5
      java-api/ruoyi-modules/h-project/src/main/java/org/dromara/officialWebsite/domain/bo/OwCasesBo.java
  3. +35
    -8
      java-api/ruoyi-modules/h-project/src/main/java/org/dromara/officialWebsite/domain/vo/OwCasesVo.java
  4. +1
    -1
      java-api/ruoyi-modules/h-project/src/main/java/org/dromara/officialWebsite/front/controller/OwFrontCasesController.java
  5. +23
    -14
      plus-ui/src/views/officialWebsite/cases/index.vue

+ 13
- 13
java-api/ruoyi-modules/h-project/src/main/java/org/dromara/officialWebsite/domain/OwCases.java View File

@ -56,7 +56,7 @@ public class OwCases extends BaseEntity {
private String selected;
/**
* 客户名称
* 功能说明文档链接
*/
private String client;
@ -66,17 +66,17 @@ public class OwCases extends BaseEntity {
private Date completionDate;
/**
* 客户面临的挑战
* 设计稿链接
*/
private String challenge;
/**
* 提供的解决方案
* 小程序二维码
*/
private String solution;
/**
* 项目成果
* 网站链接
*/
private String results;
@ -85,15 +85,15 @@ public class OwCases extends BaseEntity {
*/
private String content;
/**
* 客户评价
*/
private String testimonial;
/**
* 评价人及职位
*/
private String testimonialAuthor;
/**
* 设计展示
*/
private String testimonial;
//
// /**
// * 评价人及职位
// */
// private String testimonialAuthor;
}

+ 5
- 5
java-api/ruoyi-modules/h-project/src/main/java/org/dromara/officialWebsite/domain/bo/OwCasesBo.java View File

@ -62,7 +62,7 @@ public class OwCasesBo extends BaseEntity {
private String selected;
/**
* 客户名称
* 功能说明文档链接
*/
private String client;
@ -72,17 +72,17 @@ public class OwCasesBo extends BaseEntity {
private Date completionDate;
/**
* 客户面临的挑战
* 设计稿链接
*/
private String challenge;
/**
* 提供的解决方案
* 小程序二维码
*/
private String solution;
/**
* 项目成果
* 网站链接
*/
private String results;
@ -92,7 +92,7 @@ public class OwCasesBo extends BaseEntity {
private String content;
/**
* 客户评价
* 设计展示
*/
private String testimonial;


+ 35
- 8
java-api/ruoyi-modules/h-project/src/main/java/org/dromara/officialWebsite/domain/vo/OwCasesVo.java View File

@ -34,7 +34,7 @@ public class OwCasesVo implements Serializable {
* 编号
*/
@ExcelProperty(value = "编号")
private Long id;
private String id;
/**
* 标题
@ -77,11 +77,17 @@ public class OwCasesVo implements Serializable {
private String categoryName;
/**
* 客户名称
* 功能说明文档链接
*/
@ExcelProperty(value = "客户名称")
@ExcelProperty(value = "功能说明文档链接")
private String client;
/**
* 功能说明文档链接Url
*/
@Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "client")
private String clientUrl;
/**
* 完成日期
*/
@ -89,18 +95,33 @@ public class OwCasesVo implements Serializable {
private Date completionDate;
/**
* 客户面临的挑战
* 设计稿链接
*/
@ExcelProperty(value = "设计稿链接")
private String challenge;
/**
* 提供的解决方案
* 设计稿链接Url
*/
@Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "challenge")
private String challengeUrl;
/**
* 小程序二维码
*/
@ExcelProperty(value = "小程序二维码")
private String solution;
/**
* 项目成果
* 小程序二维码Url
*/
@Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "solution")
private String solutionUrl;
/**
* 网站链接
*/
@ExcelProperty(value = "网站链接")
private String results;
/**
@ -109,13 +130,19 @@ public class OwCasesVo implements Serializable {
private String content;
/**
* 客户评价
* 设计展示
*/
private String testimonial;
/**
* 设计展示Url
*/
@Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "testimonial")
private String testimonialUrl;
/**
* 评价人及职位
*/
private String testimonialAuthor;
//private String testimonialAuthor;
}

+ 1
- 1
java-api/ruoyi-modules/h-project/src/main/java/org/dromara/officialWebsite/front/controller/OwFrontCasesController.java View File

@ -51,7 +51,7 @@ public class OwFrontCasesController extends BaseController {
*
* @param id 主键
*/
@GetMapping("/{id}")
@GetMapping("/detail/{id}")
public R<OwCasesVo> getInfo(@NotNull(message = "主键不能为空")
@PathVariable Long id) {
return R.ok(owCasesService.queryById(id));


+ 23
- 14
plus-ui/src/views/officialWebsite/cases/index.vue View File

@ -69,7 +69,7 @@
</template>
</el-table-column>
<el-table-column label="分类" align="center" prop="categoryName" />
<el-table-column label="客户名称" align="center" prop="client" />
<!-- <el-table-column label="功能说明文档" align="center" prop="client" /> -->
<el-table-column label="完成日期" align="center" prop="completionDate" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
@ -111,30 +111,39 @@
<el-form-item label="简介" prop="description">
<el-input v-model="form.description" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="客户名称" prop="client">
<el-input v-model="form.client" placeholder="请输入客户名称" />
</el-form-item>
<el-form-item label="完成日期" prop="completionDate">
<el-input v-model="form.completionDate" placeholder="请输入完成日期" />
</el-form-item>
<el-form-item label="客户面临的挑战" prop="challenge">
<el-input v-model="form.challenge" placeholder="请输入客户面临的挑战" />
<el-form-item label="功能说明文档" prop="client">
<div class="mb-2">
<file-upload v-model="form.client" :max-count="1" />
</div>
<el-input v-model="form.client" placeholder="或手动输入功能说明文档链接" />
</el-form-item>
<el-form-item label="设计稿" prop="challenge">
<div class="mb-2">
<file-upload v-model="form.challenge" :max-count="1" />
</div>
<el-input v-model="form.challenge" placeholder="或手动输入设计稿链接" />
</el-form-item>
<el-form-item label="提供的解决方案" prop="solution">
<el-input v-model="form.solution" placeholder="请输入提供的解决方案" />
<el-form-item label="小程序二维码" prop="solution">
<div class="mb-2">
<image-upload v-model="form.solution" :max-count="1" />
</div>
<el-input v-model="form.solution" placeholder="或手动输入小程序二维码链接" />
</el-form-item>
<el-form-item label="项目成果" prop="results">
<el-input v-model="form.results" placeholder="请输入项目成果" />
<el-form-item label="网站" prop="results">
<el-input v-model="form.results" placeholder="请输入网站链接" />
</el-form-item>
<el-form-item label="详情">
<editor v-model="form.content" :min-height="192" />
</el-form-item>
<el-form-item label="客户评价" prop="testimonial">
<el-input v-model="form.testimonial" type="textarea" placeholder="请输入内容" />
<el-form-item label="设计展示" prop="testimonial">
<image-upload v-model="form.image" :max-count="9" />
</el-form-item>
<el-form-item label="评价人及职位" prop="testimonialAuthor">
<!-- <el-form-item label="评价人及职位" prop="testimonialAuthor">
<el-input v-model="form.testimonialAuthor" placeholder="请输入评价人及职位" />
</el-form-item>
</el-form-item> -->
</el-form>
<template #footer>
<div class="dialog-footer">


Loading…
Cancel
Save