feat: 新增文案模板管理功能,源码明细页按钮支持动态配置
- 新增 tt_copy_template 表及 CRUD 后端接口
- 新增文案模板管理页面,支持 {变量} 占位符动态替换
- 源码明细页复制按钮由硬编码改为数据库驱动
- 支持占位符:codeName、projectCode、projectName、codeDesc、codeEnvironment、codeTechnology、diskLink、screenshots
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
52
ruoyi-ui/src/api/office/copyTemplate.js
Normal file
52
ruoyi-ui/src/api/office/copyTemplate.js
Normal file
@@ -0,0 +1,52 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询文案模板列表
|
||||
export function listCopyTemplate(query) {
|
||||
return request({
|
||||
url: '/office/copyTemplate/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询所有启用的文案模板(源码明细页按钮用)
|
||||
export function listEnabledTemplates() {
|
||||
return request({
|
||||
url: '/office/copyTemplate/enabled',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询文案模板详细
|
||||
export function getCopyTemplate(templateId) {
|
||||
return request({
|
||||
url: '/office/copyTemplate/' + templateId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增文案模板
|
||||
export function addCopyTemplate(data) {
|
||||
return request({
|
||||
url: '/office/copyTemplate',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改文案模板
|
||||
export function updateCopyTemplate(data) {
|
||||
return request({
|
||||
url: '/office/copyTemplate',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除文案模板
|
||||
export function delCopyTemplate(templateId) {
|
||||
return request({
|
||||
url: '/office/copyTemplate/' + templateId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user