Commit 148f5d1a by 李伟康

fix(earlyWarning): 修复策略配置中的日期选择器选项逻辑

- 修改日期范围选择器的选项配置方式
- 添加动态选项函数支持不同策略类型的日期选择
- 优化日期选择器选项
1 parent 639586e7
...@@ -93,7 +93,10 @@ const STRATEGY_FORM_2456 = [ ...@@ -93,7 +93,10 @@ const STRATEGY_FORM_2456 = [
label: "执行周期", label: "执行周期",
type: "daterange", type: "daterange",
key: "dateRange", key: "dateRange",
pickerOptions: "afterPickerOptions", pickerOptionsFun: (val) => {
let { strategyType } = val;
return [5, 6].includes(strategyType) ? '' : 'afterPickerOptions'
}
}, },
]; ];
const STRATEGY_FORM_3 = [ const STRATEGY_FORM_3 = [
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
range-separator="至" range-separator="至"
start-placeholder="开始时间" start-placeholder="开始时间"
type="daterange" type="daterange"
:picker-options="datePickerOptions[item.pickerOptions]"> :picker-options=" datePickerOptions[item.pickerOptionsFun ? item.pickerOptionsFun(formData) : item.pickerOptions]">
</el-date-picker> </el-date-picker>
</template> </template>
<template v-else-if="item.type == 'textarea'"> <template v-else-if="item.type == 'textarea'">
...@@ -276,7 +276,7 @@ export default { ...@@ -276,7 +276,7 @@ export default {
1: STRATEGY_FORM_1, 1: STRATEGY_FORM_1,
3: STRATEGY_FORM_3, 3: STRATEGY_FORM_3,
}[strategyType] || []; }[strategyType] || [];
console.log(strategyType, list)
return [ return [
...list, ...list,
{ {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!