diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/controller/AiolResourceContentController.java b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/controller/AiolResourceContentController.java new file mode 100644 index 00000000..50c8f147 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/controller/AiolResourceContentController.java @@ -0,0 +1,219 @@ +package org.jeecg.modules.aiol.controller; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.query.QueryRuleEnum; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.aiol.entity.AiolResourceContent; +import org.jeecg.modules.aiol.service.IAiolResourceContentService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Operation; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.jeecg.config.shiro.IgnoreAuth; + /** + * @Description: 资源内容 + * @Author: jeecg-boot + * @Date: 2025-09-23 + * @Version: V1.0 + */ +@Tag(name="资源内容") +@RestController +@RequestMapping("/aiol/aiolResourceContent") +@Slf4j +public class AiolResourceContentController extends JeecgController { + @Autowired + private IAiolResourceContentService aiolResourceContentService; + + /** + * 分页列表查询 + * + * @param aiolResourceContent + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "资源内容-分页列表查询") + @Operation(summary="资源内容-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(AiolResourceContent aiolResourceContent, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + + + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(aiolResourceContent, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = aiolResourceContentService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param aiolResourceContent + * @return + */ + @AutoLog(value = "资源内容-添加") + @Operation(summary="资源内容-添加") + @RequiresPermissions("aiol:aiol_resource_content:add") + @PostMapping(value = "/add") + public Result add(@RequestBody AiolResourceContent aiolResourceContent) { + aiolResourceContentService.save(aiolResourceContent); + + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param aiolResourceContent + * @return + */ + @AutoLog(value = "资源内容-编辑") + @Operation(summary="资源内容-编辑") + @RequiresPermissions("aiol:aiol_resource_content:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody AiolResourceContent aiolResourceContent) { + aiolResourceContentService.updateById(aiolResourceContent); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "资源内容-通过id删除") + @Operation(summary="资源内容-通过id删除") + @RequiresPermissions("aiol:aiol_resource_content:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + aiolResourceContentService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "资源内容-批量删除") + @Operation(summary="资源内容-批量删除") + @RequiresPermissions("aiol:aiol_resource_content:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.aiolResourceContentService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "资源内容-通过id查询") + @Operation(summary="资源内容-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + AiolResourceContent aiolResourceContent = aiolResourceContentService.getById(id); + if(aiolResourceContent==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(aiolResourceContent); + } + + /** + * 查询视频总结 + * 根据资源ID在 aiol_resource_content 表查询 content_type=video_summary 的记录 + */ + @Operation(summary = "查询视频总结", description = "根据资源ID查询content_type=video_summary的资源内容") + @IgnoreAuth + @GetMapping(value = "/video_summary") + public Result queryVideoSummary(@RequestParam(name = "resourceId") String resourceId) { + try { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq("resource_id", resourceId).eq("content_type", "video_summary"); + // 存在多条时仅取第一条,避免抛异常 + AiolResourceContent record = aiolResourceContentService.getOne(wrapper, false); + return Result.OK(record); + } catch (Exception e) { + log.error("查询视频总结失败: resourceId={}, error={}", resourceId, e.getMessage(), e); + return Result.error("查询视频总结失败: " + e.getMessage()); + } + } + + @Operation(summary = "查询视频字幕", description = "根据资源ID查询content_type=video_subtitle的资源内容") + @IgnoreAuth + @GetMapping(value = "/video_subtitle") + public Result queryVideoSubtitle(@RequestParam(name = "resourceId") String resourceId) { + try { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq("resource_id", resourceId).eq("content_type", "video_subtitle"); + // 存在多条时仅取第一条,避免抛异常 + AiolResourceContent record = aiolResourceContentService.getOne(wrapper, false); + return Result.OK(record); + } catch (Exception e) { + log.error("查询视频字幕失败: resourceId={}, error={}", resourceId, e.getMessage(), e); + return Result.error("查询视频字幕失败: " + e.getMessage()); + } + } + + /** + * 导出excel + * + * @param request + * @param aiolResourceContent + */ + @RequiresPermissions("aiol:aiol_resource_content:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, AiolResourceContent aiolResourceContent) { + return super.exportXls(request, aiolResourceContent, AiolResourceContent.class, "资源内容"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("aiol:aiol_resource_content:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, AiolResourceContent.class); + } + +} diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/entity/AiolResourceContent.java b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/entity/AiolResourceContent.java new file mode 100644 index 00000000..1d46e50d --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/entity/AiolResourceContent.java @@ -0,0 +1,68 @@ +package org.jeecg.modules.aiol.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.TableLogic; +import org.jeecg.common.constant.ProvinceCityArea; +import org.jeecg.common.util.SpringContextUtils; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 资源内容 + * @Author: jeecg-boot + * @Date: 2025-09-23 + * @Version: V1.0 + */ +@Data +@TableName("aiol_resource_content") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@Schema(description="资源内容") +public class AiolResourceContent implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @Schema(description = "主键") + private java.lang.String id; + /**内容类型*/ + @Excel(name = "内容类型", width = 15) + @Schema(description = "内容类型") + private java.lang.String contentType; + /**内容数据*/ + @Excel(name = "内容数据", width = 15) + @Schema(description = "内容数据") + private java.lang.String contentData; + /**资源id*/ + @Excel(name = "资源id", width = 15) + @Schema(description = "资源id") + private java.lang.String resourceId; + /**创建人*/ + @Schema(description = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @Schema(description = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @Schema(description = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @Schema(description = "更新日期") + private java.util.Date updateTime; +} diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/mapper/AiolResourceContentMapper.java b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/mapper/AiolResourceContentMapper.java new file mode 100644 index 00000000..3ae5e155 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/mapper/AiolResourceContentMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.aiol.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.aiol.entity.AiolResourceContent; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 资源内容 + * @Author: jeecg-boot + * @Date: 2025-09-23 + * @Version: V1.0 + */ +public interface AiolResourceContentMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/mapper/xml/AiolResourceContentMapper.xml b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/mapper/xml/AiolResourceContentMapper.xml new file mode 100644 index 00000000..0f99a6e4 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/mapper/xml/AiolResourceContentMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/service/IAiolResourceContentService.java b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/service/IAiolResourceContentService.java new file mode 100644 index 00000000..bf1b4c41 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/service/IAiolResourceContentService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.aiol.service; + +import org.jeecg.modules.aiol.entity.AiolResourceContent; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 资源内容 + * @Author: jeecg-boot + * @Date: 2025-09-23 + * @Version: V1.0 + */ +public interface IAiolResourceContentService extends IService { + +} diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/service/impl/AiolCourseServiceImpl.java b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/service/impl/AiolCourseServiceImpl.java index ee272748..39df5aa2 100644 --- a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/service/impl/AiolCourseServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/service/impl/AiolCourseServiceImpl.java @@ -410,14 +410,16 @@ public class AiolCourseServiceImpl extends ServiceImpl().eq("user_id", item.getTeacherId())); SysUser sysUser = sysUserMapper.selectById(item.getTeacherId()); - TeacherInfo teacherInfo = new TeacherInfo(); - teacherInfo.setId(item.getTeacherId()); - teacherInfo.setName(sysUser.getRealname()); - teacherInfo.setAvatar(sysUser.getAvatar()); - teacherInfo.setTitle(userInfo.getTitle()); - teacherInfo.setTag(userInfo.getTag()); - teacherInfo.setSortOrder(userInfo.getSortOrder()); - result.add(teacherInfo); + if (sysUser != null) { + TeacherInfo teacherInfo = new TeacherInfo(); + teacherInfo.setId(item.getTeacherId()); + teacherInfo.setName(sysUser.getRealname()); + teacherInfo.setAvatar(sysUser.getAvatar()); + teacherInfo.setTitle(userInfo.getTitle()); + teacherInfo.setTag(userInfo.getTag()); + teacherInfo.setSortOrder(userInfo.getSortOrder()); + result.add(teacherInfo); + } } return result; } diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/service/impl/AiolResourceContentServiceImpl.java b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/service/impl/AiolResourceContentServiceImpl.java new file mode 100644 index 00000000..cbc10c44 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/service/impl/AiolResourceContentServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.aiol.service.impl; + +import org.jeecg.modules.aiol.entity.AiolResourceContent; +import org.jeecg.modules.aiol.mapper.AiolResourceContentMapper; +import org.jeecg.modules.aiol.service.IAiolResourceContentService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 资源内容 + * @Author: jeecg-boot + * @Date: 2025-09-23 + * @Version: V1.0 + */ +@Service +public class AiolResourceContentServiceImpl extends ServiceImpl implements IAiolResourceContentService { + +} diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/uniapp/AiolResourceContentForm.vue b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/uniapp/AiolResourceContentForm.vue new file mode 100644 index 00000000..276bd8d6 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/uniapp/AiolResourceContentForm.vue @@ -0,0 +1,95 @@ + + + diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/uniapp/AiolResourceContentList.vue b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/uniapp/AiolResourceContentList.vue new file mode 100644 index 00000000..94df2cc4 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/uniapp/AiolResourceContentList.vue @@ -0,0 +1,44 @@ + + + + diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/uniapp3/AiolResourceContentData.ts b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/uniapp3/AiolResourceContentData.ts new file mode 100644 index 00000000..830fc261 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/uniapp3/AiolResourceContentData.ts @@ -0,0 +1,19 @@ +import { render } from '@/common/renderUtils'; +//列表数据 +export const columns = [ + { + title: '内容类型', + align:"center", + dataIndex: 'contentType' + }, + { + title: '内容数据', + align:"center", + dataIndex: 'contentData' + }, + { + title: '资源id', + align:"center", + dataIndex: 'resourceId' + }, +]; \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/uniapp3/AiolResourceContentForm.vue b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/uniapp3/AiolResourceContentForm.vue new file mode 100644 index 00000000..a7eddbd7 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/uniapp3/AiolResourceContentForm.vue @@ -0,0 +1,235 @@ + +{ +layout: 'default', +style: { +navigationStyle: 'custom', +navigationBarTitleText: '资源内容', +}, +} + + + + + + diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/uniapp3/AiolResourceContentList.vue b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/uniapp3/AiolResourceContentList.vue new file mode 100644 index 00000000..b2d25d3d --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/uniapp3/AiolResourceContentList.vue @@ -0,0 +1,148 @@ + +{ +layout: 'default', +style: { +navigationBarTitleText: '资源内容', +navigationStyle: 'custom', +}, +} + + + + + + diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/AiolResourceContent.api.ts b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/AiolResourceContent.api.ts new file mode 100644 index 00000000..51f72cfb --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/AiolResourceContent.api.ts @@ -0,0 +1,64 @@ +import {defHttp} from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/aiol/aiolResourceContent/list', + save='/aiol/aiolResourceContent/add', + edit='/aiol/aiolResourceContent/edit', + deleteOne = '/aiol/aiolResourceContent/delete', + deleteBatch = '/aiol/aiolResourceContent/deleteBatch', + importExcel = '/aiol/aiolResourceContent/importExcel', + exportXls = '/aiol/aiolResourceContent/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/AiolResourceContent.data.ts b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/AiolResourceContent.data.ts new file mode 100644 index 00000000..f852a03a --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/AiolResourceContent.data.ts @@ -0,0 +1,67 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '内容类型', + align:"center", + dataIndex: 'contentType' + }, + { + title: '内容数据', + align:"center", + dataIndex: 'contentData' + }, + { + title: '资源id', + align:"center", + dataIndex: 'resourceId' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '内容类型', + field: 'contentType', + component: 'Input', + }, + { + label: '内容数据', + field: 'contentData', + component: 'Input', + }, + { + label: '资源id', + field: 'resourceId', + component: 'Input', + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + contentType: {title: '内容类型',order: 0,view: 'text', type: 'string',}, + contentData: {title: '内容数据',order: 1,view: 'text', type: 'string',}, + resourceId: {title: '资源id',order: 2,view: 'text', type: 'string',}, +}; + +/** +* 流程表单调用这个方法获取formSchema +* @param param +*/ +export function getBpmFormSchema(_formData): FormSchema[]{ + // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema + return formSchema; +} \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/AiolResourceContentList.vue b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/AiolResourceContentList.vue new file mode 100644 index 00000000..760fbd0d --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/AiolResourceContentList.vue @@ -0,0 +1,206 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/V20250923_1__menu_insert_AiolResourceContent.sql b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/V20250923_1__menu_insert_AiolResourceContent.sql new file mode 100644 index 00000000..66b9952d --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/V20250923_1__menu_insert_AiolResourceContent.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/aiol文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('2025092306074930430', NULL, '资源内容', '/aiol/aiolResourceContentList', 'aiol/AiolResourceContentList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2025-09-23 18:07:43', NULL, NULL, 0); + +-- 权限控制sql +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2025092306074930431', '2025092306074930430', '添加资源内容', NULL, NULL, 0, NULL, NULL, 2, 'aiol:aiol_resource_content:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-23 18:07:43', NULL, NULL, 0, 0, '1', 0); +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2025092306074930432', '2025092306074930430', '编辑资源内容', NULL, NULL, 0, NULL, NULL, 2, 'aiol:aiol_resource_content:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-23 18:07:43', NULL, NULL, 0, 0, '1', 0); +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2025092306074930433', '2025092306074930430', '删除资源内容', NULL, NULL, 0, NULL, NULL, 2, 'aiol:aiol_resource_content:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-23 18:07:43', NULL, NULL, 0, 0, '1', 0); +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2025092306074930434', '2025092306074930430', '批量删除资源内容', NULL, NULL, 0, NULL, NULL, 2, 'aiol:aiol_resource_content:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-23 18:07:43', NULL, NULL, 0, 0, '1', 0); +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2025092306074930435', '2025092306074930430', '导出excel_资源内容', NULL, NULL, 0, NULL, NULL, 2, 'aiol:aiol_resource_content:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-23 18:07:43', NULL, NULL, 0, 0, '1', 0); +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2025092306074930436', '2025092306074930430', '导入excel_资源内容', NULL, NULL, 0, NULL, NULL, 2, 'aiol:aiol_resource_content:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2025-09-23 18:07:43', NULL, NULL, 0, 0, '1', 0); \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/components/AiolResourceContentForm.vue b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/components/AiolResourceContentForm.vue new file mode 100644 index 00000000..96996ccb --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/components/AiolResourceContentForm.vue @@ -0,0 +1,70 @@ + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/components/AiolResourceContentModal.vue b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/components/AiolResourceContentModal.vue new file mode 100644 index 00000000..e32b052d --- /dev/null +++ b/jeecg-boot/jeecg-boot-module/jeecg-module-aiol/src/main/java/org/jeecg/modules/aiol/vue3/components/AiolResourceContentModal.vue @@ -0,0 +1,99 @@ + + + + + \ No newline at end of file