Commit 68b039f8 authored by 陈浩玮's avatar 陈浩玮

组件修改

parent e133766b
<template> <template>
<a-form-model layout="vertical" :model="form" :rules="rules" ref="DrawerForm"> <Drawer ref="drawerRef" v-model="visible">
<a-form-model-item label="名称" prop="jobName"> <a-form-model layout="vertical" :model="form" :rules="rules" ref="DrawerForm">
<a-input v-model="form.jobName" :disabled="isView" /> <a-form-model-item label="名称" prop="jobName">
</a-form-model-item> <a-input v-model="form.jobName" :disabled="isView" />
<a-form-model-item label="描述" prop="jobDescription"> </a-form-model-item>
<a-textarea v-model="form.jobDescription" :disabled="isView" :rows="4" /> <a-form-model-item label="描述" prop="jobDescription">
</a-form-model-item> <a-textarea v-model="form.jobDescription" :disabled="isView" :rows="4" />
</a-form-model> </a-form-model-item>
</a-form-model>
</Drawer>
</template> </template>
<script> <script>
import Drawer from '@/components/table/drawer.vue';
import JobsApi from '@/api/organization'; import JobsApi from '@/api/organization';
import FormMixin from '@/components/FormMixin'; import FormMixin from '@/components/FormMixin';
export default { export default {
components: { Drawer },
mixins: [FormMixin], mixins: [FormMixin],
data() { data() {
return { return {
visible: false,
rules: { rules: {
jobName: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }], jobName: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }],
jobDescription: [ jobDescription: [
...@@ -25,6 +30,9 @@ export default { ...@@ -25,6 +30,9 @@ export default {
}; };
}, },
methods: { methods: {
open() {
this.visible = true;
},
add() { add() {
return JobsApi.addJobs({ ...this.form }); return JobsApi.addJobs({ ...this.form });
}, },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment