|
@ -26,12 +26,12 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="24"> |
|
|
<el-col :span="24"> |
|
|
<el-form-item label="名称" prop="name"> |
|
|
<el-form-item label="名称" prop="name"> |
|
|
<el-input v-model="formData.name" placeholder="请输入名称" clearable /> |
|
|
<el-input v-model="formData.name" placeholder="请输入名称" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="24"> |
|
|
<el-col :span="24"> |
|
|
<el-form-item label="描述" prop="description"> |
|
|
<el-form-item label="描述" prop="description"> |
|
|
<el-input v-model="formData.description" placeholder="请输入描述" clearable /> |
|
|
<el-input v-model="formData.description" placeholder="请输入描述" clearable :disabled="formData.name=='默认规则'&&formType=='update'"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
@ -41,7 +41,7 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
<el-col :span="12"> |
|
|
<el-form-item label="状态" prop="status"> |
|
|
<el-form-item label="状态" prop="status"> |
|
|
<el-switch v-model="formData.status" /> |
|
|
<el-switch v-model="formData.status" :disabled="formData.name=='默认规则'&&formType=='update'"/> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
@ -323,18 +323,18 @@ const open = async (type: string, strategyCode: string, id?: number) => { |
|
|
formData.value.description = data.description |
|
|
formData.value.description = data.description |
|
|
formData.value.priority = data.priority |
|
|
formData.value.priority = data.priority |
|
|
formData.value.status = data.status == 0 ? true : false |
|
|
formData.value.status = data.status == 0 ? true : false |
|
|
if (formData.value.priority == 0) { |
|
|
// if (formData.value.priority == 0) { |
|
|
Butttondata.value = [ |
|
|
// Butttondata.value = [ |
|
|
defaultButtons.formSaveBtn({disabled:true}), // 保存 |
|
|
// defaultButtons.formSaveBtn({disabled:true}), // 保存 |
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
// defaultButtons.formCloseBtn(null) // 关闭 |
|
|
] |
|
|
// ] |
|
|
console.log(Butttondata) |
|
|
// console.log(Butttondata) |
|
|
} else { |
|
|
// } else { |
|
|
Butttondata.value = [ |
|
|
Butttondata.value = [ |
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
] |
|
|
] |
|
|
} |
|
|
// } |
|
|
if (data.condition) { |
|
|
if (data.condition) { |
|
|
formData.value.condition = JSON.parse(data.condition) |
|
|
formData.value.condition = JSON.parse(data.condition) |
|
|
formData.value.condition.forEach((item, index) => { |
|
|
formData.value.condition.forEach((item, index) => { |
|
@ -368,10 +368,10 @@ const submitForm = async () => { |
|
|
if (!formRef) return |
|
|
if (!formRef) return |
|
|
const valid = await formRef.value.validate() |
|
|
const valid = await formRef.value.validate() |
|
|
if (!valid) return |
|
|
if (!valid) return |
|
|
if(formData.value.priority == 0){ |
|
|
// if(formData.value.priority == 0){ |
|
|
message.error('优先级不可以为0') |
|
|
// message.error('优先级不可以为0') |
|
|
return |
|
|
// return |
|
|
} |
|
|
// } |
|
|
let list = Object.values(formData.value.configuration) |
|
|
let list = Object.values(formData.value.configuration) |
|
|
let onlyOne = list.filter((item) => { |
|
|
let onlyOne = list.filter((item) => { |
|
|
return item == 'TRUE' |
|
|
return item == 'TRUE' |
|
|