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