mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 12:09:13 +08:00
fix(项目设置): 模板字段长度过长提示问题
--bug=1047708 --user=宋昌昌 【项目设置】编辑缺陷模版-缺陷内容上传链接图片-更新失败-报SQL异常 https://www.tapd.cn/55049933/s/1596880
This commit is contained in:
parent
e0a11da813
commit
d360e3e912
@ -144,7 +144,7 @@ public class ApiDocShareController {
|
||||
@GetMapping(value = "/get-detail/{id}")
|
||||
@Operation(summary = "接口测试-接口管理-获取接口详情")
|
||||
public ApiDefinitionDTO get(@PathVariable String id) {
|
||||
return apiDefinitionService.get(id, SessionUtils.getUserId());
|
||||
return apiDefinitionService.get(id, "admin");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -445,6 +445,19 @@
|
||||
try {
|
||||
loading.value = true;
|
||||
const params = getTemplateParams();
|
||||
let isSysErr = false;
|
||||
if (params.systemFields) {
|
||||
params.systemFields.forEach((item) => {
|
||||
if (item.fieldId === 'description' && item.defaultValue && item.defaultValue.length > 1500) {
|
||||
Message.error(t('system.orgTemplate.description.too.long'));
|
||||
isSysErr = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (isSysErr) {
|
||||
// 系统字段错误, 不保存
|
||||
return;
|
||||
}
|
||||
if (!templateForm.value.name) {
|
||||
isError.value = true;
|
||||
Message.error(t('system.orgTemplate.templateNamePlaceholder'));
|
||||
|
@ -77,6 +77,7 @@ export default {
|
||||
'system.orgTemplate.templatePreview': 'Template preview',
|
||||
'system.orgTemplate.templateName': 'Template name',
|
||||
'system.orgTemplate.templateNamePlaceholder': 'Please enter a template name',
|
||||
'system.orgTemplate.description.too.long': 'The default length of defect content is more than 1500!',
|
||||
'system.orgTemplate.optionalField': 'Optional Field',
|
||||
'system.orgTemplate.selectAll': 'select All',
|
||||
'system.orgTemplate.systemField': 'System Field',
|
||||
|
@ -76,6 +76,7 @@ export default {
|
||||
'system.orgTemplate.templatePreview': '模板预览',
|
||||
'system.orgTemplate.templateName': '模板名称',
|
||||
'system.orgTemplate.templateNamePlaceholder': '请输入模板名称',
|
||||
'system.orgTemplate.description.too.long': '缺陷内容默认值长度超过1500!',
|
||||
'system.orgTemplate.optionalField': '可选字段',
|
||||
'system.orgTemplate.selectAll': '全选',
|
||||
'system.orgTemplate.systemField': '系统字段',
|
||||
|
Loading…
Reference in New Issue
Block a user