|
|
@ -26,12 +26,12 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="24"> |
|
|
|
<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-col> |
|
|
|
<el-col :span="24"> |
|
|
|
<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-col> |
|
|
|
<el-col :span="12"> |
|
|
@ -41,7 +41,7 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<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-col> |
|
|
|
</el-row> |
|
|
@ -323,18 +323,18 @@ const open = async (type: string, strategyCode: string, id?: number) => { |
|
|
|
formData.value.description = data.description |
|
|
|
formData.value.priority = data.priority |
|
|
|
formData.value.status = data.status == 0 ? true : false |
|
|
|
if (formData.value.priority == 0) { |
|
|
|
Butttondata.value = [ |
|
|
|
defaultButtons.formSaveBtn({disabled:true}), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
console.log(Butttondata) |
|
|
|
} else { |
|
|
|
// if (formData.value.priority == 0) { |
|
|
|
// Butttondata.value = [ |
|
|
|
// defaultButtons.formSaveBtn({disabled:true}), // 保存 |
|
|
|
// defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
// ] |
|
|
|
// console.log(Butttondata) |
|
|
|
// } else { |
|
|
|
Butttondata.value = [ |
|
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
} |
|
|
|
// } |
|
|
|
if (data.condition) { |
|
|
|
formData.value.condition = JSON.parse(data.condition) |
|
|
|
formData.value.condition.forEach((item, index) => { |
|
|
@ -368,10 +368,10 @@ const submitForm = async () => { |
|
|
|
if (!formRef) return |
|
|
|
const valid = await formRef.value.validate() |
|
|
|
if (!valid) return |
|
|
|
if(formData.value.priority == 0){ |
|
|
|
message.error('优先级不可以为0') |
|
|
|
return |
|
|
|
} |
|
|
|
// if(formData.value.priority == 0){ |
|
|
|
// message.error('优先级不可以为0') |
|
|
|
// return |
|
|
|
// } |
|
|
|
let list = Object.values(formData.value.configuration) |
|
|
|
let onlyOne = list.filter((item) => { |
|
|
|
return item == 'TRUE' |
|
|
|