添加页面
This commit is contained in:
parent
d4062016cf
commit
39ebbb6f7f
|
@ -84,24 +84,24 @@ export const asyncRouterMap = [
|
|||
component: () => import('@/views/project/ProjectList'),
|
||||
meta: { title: '自主项目', keepAlive: true, permission: ['form'] },
|
||||
},
|
||||
{
|
||||
path: '/project/add',
|
||||
name: 'ProjectForm',
|
||||
component: () => import('@/views/project/ProjectForm'),
|
||||
meta: { title: '新增项目', keepAlive: true, permission: ['form'], show: false }
|
||||
},
|
||||
// {
|
||||
// path: '/project/add',
|
||||
// name: 'ProjectForm',
|
||||
// component: () => import('@/views/project/ProjectForm'),
|
||||
// meta: { title: '新增项目', keepAlive: true, permission: ['form'], show: false }
|
||||
// },
|
||||
{
|
||||
path: '/project/projectStepForm',
|
||||
name: 'projectStepForm',
|
||||
component: () => import('@/views/project/ProjectStepForm'),
|
||||
component: () => import('@/views/project/form/ProjectStepForm'),
|
||||
meta: { title: '新增项目-分布', keepAlive: true, permission: ['form'] }
|
||||
},
|
||||
{
|
||||
path: '/project/unitSelect',
|
||||
name: 'unitSelect',
|
||||
component: () => import('@/views/project/ProjectUnitSelect'),
|
||||
meta: { title: '选择单位', keepAlive: true, permission: ['form'] }
|
||||
},
|
||||
// {
|
||||
// path: '/project/unitSelect',
|
||||
// name: 'unitSelect',
|
||||
// component: () => import('@/views/project/ProjectUnitSelect'),
|
||||
// meta: { title: '选择单位', keepAlive: true, permission: ['form'] }
|
||||
// },
|
||||
{
|
||||
path: '/form/step-form',
|
||||
name: 'StepForm',
|
||||
|
|
|
@ -49,7 +49,7 @@ const errorHandler = (error) => {
|
|||
request.interceptors.request.use(config => {
|
||||
// const token = storage.get(ACCESS_TOKEN)
|
||||
// 由于登录接口待联调,token使用默认值
|
||||
const token = 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImY1ODZhMzc5LWQ3MjYtNDYxZS04MmFiLTUyNWRhNzI1ZjBhZCJ9.4AsSbHaR9W7dz1wBJ-u6-dL8VS5Su12eoXPnFriX-nn-CIiOMtSctMciECijN4F7uYrzUU8KP8jwkCJbPlMaQA'
|
||||
const token = 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjIwMzU2Nzg5LWYyOGEtNDYxYi1iNTRhLTM2MWYzZjdhZjg2NSJ9.4vGoaj9KK8aYp9gEz2cnRM8MBWPrqIo8O5wNgbYK4-JUE3naeEuejjr3JfZ57TLbMYWqG1MkJ0kAT-2GMgreGQ'
|
||||
// 如果 token 存在,让每个请求携带自定义 token 请根据实际情况自行修改
|
||||
if (token) {
|
||||
config.headers[ACCESS_TOKEN] = token
|
||||
|
|
|
@ -1,132 +0,0 @@
|
|||
<template>
|
||||
<!-- <page-header-wrapper :title="新增项目"> -->
|
||||
<a-form-model :model="form" :label-col="labelCol" :wrapper-col="wrapperCol" :layout="vertical">
|
||||
<a-form-model-item label="项目名称">
|
||||
<a-input
|
||||
v-model="form.projectName"
|
||||
v-decorator="[
|
||||
'projectName',
|
||||
{
|
||||
rules: [{ required: true, message: '项目名称为必填' }],
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="培训种类">
|
||||
<a-select v-model="form.trainClass" placeholder="--请选择--">
|
||||
<a-select-option value="shanghai"> Zone one </a-select-option>
|
||||
<a-select-option value="beijing"> Zone two </a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="培训类型">
|
||||
<a-select v-model="form.trainType" placeholder="--请选择--">
|
||||
<a-select-option value="1"> 必修课 </a-select-option>
|
||||
<a-select-option value="2"> 选修课 </a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="培训方式">
|
||||
<a-select v-model="form.trainWay" placeholder="--请选择--">
|
||||
<a-select-option value="1"> 培训 </a-select-option>
|
||||
<a-select-option value="2"> 考试 </a-select-option>
|
||||
<a-select-option value="3"> 培训-练习 </a-select-option>
|
||||
<a-select-option value="4"> 培训-练习-考试 </a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="人员类型">
|
||||
<a-select v-model="form.personType" placeholder="--请选择--">
|
||||
<a-select-option v-for="item in personType" :key="item.id"> {{ item.name }} </a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
<!-- 时间选择器呢 -->
|
||||
<a-form-item label="培训时间" style="margin-bottom: 0">
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-date-picker v-model="form.trainSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-date-picker v-model="form.trainEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
</a-form-item>
|
||||
<!-- 时间选择器 -->
|
||||
<a-form-item v-if="['2', '3', '4'].includes(form.trainWay)" label="练习时间" style="margin-bottom: 0">
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-date-picker v-model="form.practiceSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-date-picker v-model="form.practiceEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
</a-form-item>
|
||||
<!-- 时间选择器 -->
|
||||
<a-form-item v-if="['2', '3', '4'].includes(form.trainWay)" label="考试时间" style="margin-bottom: 0">
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-date-picker v-model="form.examSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-date-picker v-model="form.examEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
</a-form-item>
|
||||
|
||||
<!-- 考试次数 -->
|
||||
<a-form-item v-if="['2', '3', '4'].includes(form.trainWay)" label="考试次数" style="margin-bottom: 0">
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
|
||||
<a-input-number v-model="form.examNumber" :min="0" style="width: 100%" />
|
||||
</a-form-item>
|
||||
<span> 补考次数: </span>
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
|
||||
<a-input-number v-model="form.resitNumber" :min="0" style="width: 100%" />
|
||||
</a-form-item>
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
|
||||
<a-button type="primary" @click="javascript;"> 随机补考 </a-button>
|
||||
</a-form-item>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-model-item label="模拟考试" v-if="['2', '3', '4'].includes(form.trainWay)">
|
||||
<a-radio-group v-model="form.mockExam">
|
||||
<a-radio value="1"> 允许 </a-radio>
|
||||
<a-radio value="0"> 不允许 </a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item label="备注">
|
||||
<a-input v-model="form.remark" type="textarea" />
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :wrapper-col="{ span: 14, offset: 4 }">
|
||||
<a-button type="primary" @click="toNext"> 下一步 </a-button>
|
||||
<a-button style="margin-left: 10px"> 取消 </a-button>
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
<!-- </page-header-wrapper> -->
|
||||
</template>
|
||||
<script>
|
||||
import { dictGet } from '@/api/project/project'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
labelCol: { span: 4 },
|
||||
wrapperCol: { span: 14 },
|
||||
form: {
|
||||
projectName: '',
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
dictGet,
|
||||
},
|
||||
created: {},
|
||||
methods: {
|
||||
//获取字典值
|
||||
getPersonType() {
|
||||
return dictGet(Object.assign(parameter)).then((res) => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
||||
//下一步,跳转页面带上from对象
|
||||
toNext() {
|
||||
console.log('toNext', this.form)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
|
@ -75,7 +75,7 @@
|
|||
import moment from 'moment'
|
||||
import { STable } from '@/components'
|
||||
import { getProjectList } from '@/api/project/project'
|
||||
import ProjectForm from '@/views/project/ProjectForm'
|
||||
import ProjectForm from '@/views/project/form/ProjectForm'
|
||||
import router from '@/router/index.js'
|
||||
|
||||
export default {
|
||||
|
@ -107,7 +107,6 @@ export default {
|
|||
{
|
||||
title: '项目状态',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
customRender: (text, record, index) => {
|
||||
//项目状态 1-未发布 2-未开始 3-进行中 4-已完成 5-已中止
|
||||
if (text == 1) {
|
||||
|
@ -132,7 +131,6 @@ export default {
|
|||
{
|
||||
title: '操作',
|
||||
width: 200,
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
scopedSlots: { customRender: 'action' },
|
||||
},
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
<template>
|
||||
<div>
|
||||
<h1>课程选择</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
||||
//例如:import 《组件名称》 from '《组件路径》'
|
||||
|
||||
export default {
|
||||
//import引入的组件需要注入到对象中才能使用
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
//这里存放数据
|
||||
return {};
|
||||
},
|
||||
//计算属性 类似于data概念
|
||||
computed: {},
|
||||
//监控data中的数据变化
|
||||
watch: {},
|
||||
//方法集合
|
||||
methods: {},
|
||||
created() {}, //生命周期 - 创建完成(可以访问当前this实例)
|
||||
mounted() {}, //生命周期 - 挂载完成(可以访问DOM元素)
|
||||
beforeCreate() {}, //生命周期 - 创建之前
|
||||
beforeMount() {}, //生命周期 - 挂载之前
|
||||
beforeUpdate() {}, //生命周期 - 更新之前
|
||||
updated() {}, //生命周期 - 更新之后
|
||||
beforeDestroy() {}, //生命周期 - 销毁之前
|
||||
destroyed() {}, //生命周期 - 销毁完成
|
||||
activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
|
||||
};
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
|
@ -0,0 +1,188 @@
|
|||
<template>
|
||||
<!-- <page-header-wrapper :title="新增项目"> -->
|
||||
<a-form-model :model="form" :label-col="labelCol" :wrapper-col="wrapperCol" :layout="vertical">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="24" :sm="24">
|
||||
<a-form-model-item label="项目名称">
|
||||
<a-input
|
||||
v-model="form.projectName"
|
||||
v-decorator="[
|
||||
'projectName',
|
||||
{
|
||||
rules: [{ required: true, message: '项目名称为必填' }],
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="培训种类">
|
||||
<a-select v-model="form.trainClass" placeholder="--请选择--">
|
||||
<a-select-option value="shanghai"> Zone one </a-select-option>
|
||||
</a-select>
|
||||
<a-button type="primary" @click="createClass"> 新增种类 </a-button>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="培训类型">
|
||||
<a-select v-model="form.trainType" placeholder="--请选择--">
|
||||
<a-select-option value="1"> 必修课 </a-select-option>
|
||||
<a-select-option value="2"> 选修课 </a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="培训方式">
|
||||
<a-select v-model="form.trainWay" placeholder="--请选择--">
|
||||
<a-select-option value="1"> 培训 </a-select-option>
|
||||
<a-select-option value="2"> 考试 </a-select-option>
|
||||
<a-select-option value="3"> 培训-练习 </a-select-option>
|
||||
<a-select-option value="4"> 培训-练习-考试 </a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="人员类型">
|
||||
<a-select v-model="form.personType" placeholder="--请选择--">
|
||||
<a-select-option v-for="item in personType" :key="item.value"> {{ item.name }} </a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<!-- 时间选择器呢 -->
|
||||
<a-col :span="24">
|
||||
<a-form-item label="培训时间" style="margin-bottom: 0">
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-date-picker v-model="form.trainSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-date-picker v-model="form.trainEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 时间选择器 -->
|
||||
<a-col :span="24">
|
||||
<a-form-item v-if="['2', '3', '4'].includes(form.trainWay)" label="练习时间" style="margin-bottom: 0">
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-date-picker v-model="form.practiceSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-date-picker v-model="form.practiceEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 时间选择器 -->
|
||||
<a-col :span="24">
|
||||
<a-form-item v-if="['2', '3', '4'].includes(form.trainWay)" label="考试时间" style="margin-bottom: 0">
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-date-picker v-model="form.examSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }">
|
||||
<a-date-picker v-model="form.examEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<!-- 考试次数 -->
|
||||
<a-col :span="24">
|
||||
<a-form-item v-if="['2', '3', '4'].includes(form.trainWay)" label="考试次数" style="margin-bottom: 0">
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
|
||||
<a-input-number v-model="form.examNumber" :min="0" style="width: 100%" />
|
||||
</a-form-item>
|
||||
<span> 补考次数: </span>
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
|
||||
<a-input-number v-model="form.resitNumber" :min="0" style="width: 100%" />
|
||||
</a-form-item>
|
||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(30% - 1px)' }">
|
||||
<a-button type="primary" @click="javascript;"> 随机补考 </a-button>
|
||||
</a-form-item>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="模拟考试" v-if="['2', '3', '4'].includes(form.trainWay)">
|
||||
<a-radio-group v-model="form.mockExam">
|
||||
<a-radio value="1"> 允许 </a-radio>
|
||||
<a-radio value="0"> 不允许 </a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item label="备注">
|
||||
<a-input v-model="form.remark" type="textarea" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-model-item :wrapper-col="{ span: 14, offset: 4 }">
|
||||
<a-button type="primary" @click="toNext"> 下一步 </a-button>
|
||||
<a-button style="margin-left: 10px"> 取消 </a-button>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
<!-- </page-header-wrapper> -->
|
||||
</template>
|
||||
<script>
|
||||
import { dictGet } from '@/api/project/project'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
labelCol: { span: 4 },
|
||||
wrapperCol: { span: 14 },
|
||||
form: this.$form.createForm(this),
|
||||
personType: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
dictGet,
|
||||
},
|
||||
created() {
|
||||
this.fetchTemplateData()
|
||||
},
|
||||
methods: {
|
||||
//获取字典值
|
||||
fetchTemplateData() {
|
||||
console.log('fetchTemplateData')
|
||||
let formData = { type: 1 }
|
||||
//请求数据方法
|
||||
dictGet(formData).then((res) => {
|
||||
console.log(res)
|
||||
//这里根据自己接口返回进行判断 和循环赋值
|
||||
if (res.code == 200) {
|
||||
const result = res.data
|
||||
result.forEach((r) => {
|
||||
this.personType.push({
|
||||
value: r.value,
|
||||
name: r.name,
|
||||
})
|
||||
})
|
||||
console.log("----------------",this.personType)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//跳转到下一页面
|
||||
//下一步,跳转页面带上from对象
|
||||
toNext() {
|
||||
console.log('toNext', this.form)
|
||||
const {
|
||||
form: { validateFields },
|
||||
} = this
|
||||
// 先校验,通过表单校验后,才进入下一步
|
||||
validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.$emit('nextStep')
|
||||
}
|
||||
})
|
||||
},
|
||||
createClass(){
|
||||
console.log("-------createClass--------")
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
|
@ -8,12 +8,16 @@
|
|||
<a-steps class="steps" :current="currentTab">
|
||||
<a-step title="基本信息" />
|
||||
<a-step title="选择单位" />
|
||||
<a-step title="选择课程" />
|
||||
<a-step title="选择人员" />
|
||||
<a-step title="完成" />
|
||||
</a-steps>
|
||||
<div class="content">
|
||||
<step1 v-if="currentTab === 0" @nextStep="nextStep"/>
|
||||
<step2 v-if="currentTab === 1" @nextStep="nextStep" @prevStep="prevStep"/>
|
||||
<step3 v-if="currentTab === 2" @prevStep="prevStep" @finish="finish"/>
|
||||
<step2 v-if="currentTab === 2" @nextStep="nextStep" @prevStep="prevStep"/>
|
||||
<step2 v-if="currentTab === 3" @nextStep="nextStep" @prevStep="prevStep"/>
|
||||
<step3 v-if="currentTab === 4" @prevStep="prevStep" @finish="finish"/>
|
||||
</div>
|
||||
</a-card>
|
||||
</page-header-wrapper>
|
||||
|
@ -22,20 +26,20 @@
|
|||
<script>
|
||||
import Step1 from './ProjectForm'
|
||||
import Step2 from './ProjectUnitSelect.vue'
|
||||
import Step3 from '../form/stepForm/Step3'
|
||||
import Step3 from './ProjectCourseSelect.vue'
|
||||
|
||||
export default {
|
||||
name: 'StepForm',
|
||||
components: {
|
||||
Step1,
|
||||
Step2,
|
||||
Step3
|
||||
Step3,
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
currentTab: 0,
|
||||
// form
|
||||
form: null
|
||||
form: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<page-header-wrapper title="请选择受训单位">
|
||||
<a-form-model :model="form">
|
||||
<a-form-model-item :wrapper-col="{ span: 14, offset: 4,}" >
|
||||
<a-form-model-item :wrapper-col="{ span: 14, offset: 4 }">
|
||||
<a-button type="primary" @click="toNext"> 下一步 </a-button>
|
||||
<a-button style="margin-left: 10px"> 取消 </a-button>
|
||||
</a-form-model-item>
|
||||
|
@ -111,7 +111,7 @@ function handleTreeData(data, targetKeys = []) {
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
form: this.$form.createForm(this),
|
||||
targetKeys: [],
|
||||
dataSource: transferDataSource,
|
||||
|
||||
|
@ -131,6 +131,18 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
toNext() {
|
||||
console.log('toNext', this.form)
|
||||
const {
|
||||
form: { validateFields },
|
||||
} = this
|
||||
// 先校验,通过表单校验后,才进入下一步
|
||||
validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.$emit('nextStep')
|
||||
}
|
||||
})
|
||||
},
|
||||
onChange(targetKeys) {
|
||||
console.log('Target Keys:', targetKeys)
|
||||
this.targetKeys = targetKeys
|
Loading…
Reference in New Issue