mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-10 08:57:14 +08:00
chore: 优化部分命名和提示
This commit is contained in:
@@ -172,8 +172,8 @@ const reset = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
const onDelete = (item: ${classNamePrefix}Resp) => {
|
const onDelete = (record: ${classNamePrefix}Resp) => {
|
||||||
return handleDelete(() => delete${classNamePrefix}(item.id), {
|
return handleDelete(() => delete${classNamePrefix}(record.id), {
|
||||||
content: `是否确定删除该条数据?`,
|
content: `是否确定删除该条数据?`,
|
||||||
showModal: true
|
showModal: true
|
||||||
})
|
})
|
||||||
@@ -191,14 +191,14 @@ const onAdd = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 修改
|
// 修改
|
||||||
const onUpdate = (item: ${classNamePrefix}Resp) => {
|
const onUpdate = (record: ${classNamePrefix}Resp) => {
|
||||||
${classNamePrefix}AddModalRef.value?.onUpdate(item.id)
|
${classNamePrefix}AddModalRef.value?.onUpdate(record.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
const ${classNamePrefix}DetailDrawerRef = ref<InstanceType<typeof ${classNamePrefix}DetailDrawer>>()
|
const ${classNamePrefix}DetailDrawerRef = ref<InstanceType<typeof ${classNamePrefix}DetailDrawer>>()
|
||||||
// 详情
|
// 详情
|
||||||
const onDetail = (item: ${classNamePrefix}Resp) => {
|
const onDetail = (record: ${classNamePrefix}Resp) => {
|
||||||
${classNamePrefix}DetailDrawerRef.value?.onDetail(item.id)
|
${classNamePrefix}DetailDrawerRef.value?.onDetail(record.id)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@@ -59,9 +59,9 @@ public class JobClient {
|
|||||||
private final String password;
|
private final String password;
|
||||||
|
|
||||||
public JobClient(String url, String username, String password) {
|
public JobClient(String url, String username, String password) {
|
||||||
Assert.notBlank(url, "任务调度服务 URL 不能为空");
|
Assert.notBlank(url, "任务调度中心 URL 不能为空");
|
||||||
Assert.notBlank(username, "任务调度服务用户名不能为空");
|
Assert.notBlank(username, "任务调度中心用户名不能为空");
|
||||||
Assert.notBlank(password, "任务调度服务密码不能为空");
|
Assert.notBlank(password, "任务调度中心密码不能为空");
|
||||||
this.url = url;
|
this.url = url;
|
||||||
this.username = username;
|
this.username = username;
|
||||||
this.password = password;
|
this.password = password;
|
||||||
@@ -85,7 +85,7 @@ public class JobClient {
|
|||||||
return result.getData();
|
return result.getData();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Request job server failed, error msg: {}", e.getMessage(), e);
|
log.error("Request job server failed, error msg: {}", e.getMessage(), e);
|
||||||
throw new IllegalStateException(e);
|
throw new IllegalStateException("连接任务调度中心异常");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ public class JobClient {
|
|||||||
return page;
|
return page;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Request job server failed, error msg: {}", e.getMessage(), e);
|
log.error("Request job server failed, error msg: {}", e.getMessage(), e);
|
||||||
throw new IllegalStateException(e);
|
throw new IllegalStateException("连接任务调度中心异常");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ public class JobClient {
|
|||||||
httpRequest.body(JSONUtil.toJsonStr(paramMap));
|
httpRequest.body(JSONUtil.toJsonStr(paramMap));
|
||||||
HttpResponse response = httpRequest.execute();
|
HttpResponse response = httpRequest.execute();
|
||||||
if (!response.isOk() || response.body() == null) {
|
if (!response.isOk() || response.body() == null) {
|
||||||
throw new IllegalStateException("连接任务调度中心错误");
|
throw new IllegalStateException("连接任务调度中心异常");
|
||||||
}
|
}
|
||||||
Result<?> result = JSONUtil.toBean(response.body(), Result.class);
|
Result<?> result = JSONUtil.toBean(response.body(), Result.class);
|
||||||
if (!STATUS_SUCCESS.equals(result.getStatus())) {
|
if (!STATUS_SUCCESS.equals(result.getStatus())) {
|
||||||
@@ -160,7 +160,7 @@ public class JobClient {
|
|||||||
*/
|
*/
|
||||||
private void checkResponse(ResponseEntity<?> responseEntity) {
|
private void checkResponse(ResponseEntity<?> responseEntity) {
|
||||||
if (!responseEntity.getStatusCode().is2xxSuccessful() || responseEntity.getBody() == null) {
|
if (!responseEntity.getStatusCode().is2xxSuccessful() || responseEntity.getBody() == null) {
|
||||||
throw new IllegalStateException("连接任务调度中心错误");
|
throw new IllegalStateException("连接任务调度中心异常");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user