<template>
    <a-form-model layout="vertical" :model="form" :rules="rules" ref="DrawerForm">
        <a-form-model-item label="名称" prop="jobName">
            <a-input v-model="form.jobName" :disabled="isView" />
        </a-form-model-item>
        <a-form-model-item label="描述" prop="jobDescription">
            <a-textarea v-model="form.jobDescription" :disabled="isView" :rows="4" />
        </a-form-model-item>
    </a-form-model>
</template>

<script>
import JobsApi from '@/api/organization';
import FormMixin from '@/components/FormMixin';
export default {
    mixins: [FormMixin],
    data() {
        return {
            rules: {
                jobName: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }],
                jobDescription: [
                    { required: true, message: 'Please select Activity zone', trigger: 'change' },
                ],
            },
        };
    },
    methods: {
        add() {
            return JobsApi.add({ ...this.form });
        },
        edit() {
            return JobsApi.update({ ...this.form });
        },
    },
};
</script>
