|
|
@ -181,7 +181,8 @@ const change = (e) => { |
|
|
|
const formStrategyCode = ref('') |
|
|
|
// form表单数据 |
|
|
|
const formData = ref({ |
|
|
|
strategyCode: formStrategyCode.value,//策略代码 |
|
|
|
id:'', |
|
|
|
strategyCode: formStrategyCode.value,//策略代码id |
|
|
|
code: formStrategyCode.value,//规则代码 |
|
|
|
name: '',//名称 |
|
|
|
description: '',//描述 |
|
|
@ -309,6 +310,7 @@ const open = async (type: string, strategyCode: string, id?: number) => { |
|
|
|
formLoading.value = true |
|
|
|
try { |
|
|
|
let data = await RuleApi.getRule(id) |
|
|
|
formData.value.id = data.id |
|
|
|
formData.value.strategyCode = data.strategyCode |
|
|
|
formData.value.code = data.code |
|
|
|
formData.value.name = data.name |
|
|
@ -342,6 +344,7 @@ const submitForm = async () => { |
|
|
|
formLoading.value = true |
|
|
|
try { |
|
|
|
let data = { |
|
|
|
id: formData.value.id, |
|
|
|
strategyCode: formData.value.strategyCode,//策略代码 |
|
|
|
code: formData.value.code,//规则代码 |
|
|
|
name: formData.value.name,//名称 |
|
|
@ -370,6 +373,7 @@ const submitForm = async () => { |
|
|
|
/** 重置表单 */ |
|
|
|
const resetForm = () => { |
|
|
|
formData.value = { |
|
|
|
id: '', |
|
|
|
strategyCode: formStrategyCode.value,//策略代码 |
|
|
|
code: formStrategyCode.value,//规则代码 |
|
|
|
name: '',//名称 |
|
|
|