| | |
| | | |
| | | const props = defineProps({ |
| | | modelValue: Boolean, |
| | | clueData: { |
| | | type: Object, |
| | | default: () => { |
| | | return {}; |
| | | } |
| | | }, |
| | | clueData: Object, |
| | | clueTask: Object, |
| | | create: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | // 自定义创建方法 |
| | | onCreate: Function, |
| | | // 自定义更新方法 |
| | | onUpdate: Function |
| | | }); |
| | | |
| | | const emits = defineEmits(['update:modelValue', 'onSubmit']); |
| | |
| | | const loading = ref(false); |
| | | // 表单检查规则 |
| | | const rules = reactive({ |
| | | clueId: [ |
| | | { |
| | | required: true, |
| | | message: '线索编号不能为空', |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | // clueId: [ |
| | | // { |
| | | // required: true, |
| | | // message: '线索编号不能为空', |
| | | // trigger: 'blur' |
| | | // } |
| | | // ], |
| | | taskTime: [ |
| | | { |
| | | required: true, |
| | |
| | | |
| | | function submit() { |
| | | const param = getParams(); |
| | | return props.create ? createClueTask(param) : updateClueTask(param); |
| | | return props.create |
| | | ? props.onCreate |
| | | ? props.onCreate(param) |
| | | : createClueTask(param) |
| | | : props.onUpdate |
| | | ? props.onUpdate(param) |
| | | : updateClueTask(param); |
| | | } |
| | | |
| | | function cancel() { |