项目管理更新
This commit is contained in:
parent
6d7fa8f542
commit
6d5ec8c345
|
@ -23,9 +23,9 @@ export function classGet(params) {
|
|||
}
|
||||
export function classDel (params) {
|
||||
return request({
|
||||
url: classApi.get,
|
||||
url: classApi.del,
|
||||
method: 'delete',
|
||||
data: params
|
||||
params: params
|
||||
})
|
||||
}
|
||||
export function classList(params) {
|
||||
|
|
|
@ -39,8 +39,7 @@
|
|||
</a-space>
|
||||
|
||||
<a-space class="table-operator" direction="horizontal">
|
||||
<a-button type="primary" icon="plus" @click="$refs.projectStepForm.add1()">新增项目</a-button>
|
||||
<a-button type="primary" icon="minus" @click="handleEdit()">删除项目</a-button>
|
||||
<a-button v-if="hasPerm('project:add')" type="primary" icon="plus" @click="$refs.projectStepForm.add()">新增项目</a-button>
|
||||
</a-space>
|
||||
|
||||
<s-table
|
||||
|
@ -49,17 +48,16 @@
|
|||
rowKey="id"
|
||||
:columns="columns"
|
||||
:data="loadData"
|
||||
:rowSelection="options.rowSelection"
|
||||
>
|
||||
<span slot="serial" slot-scope="text, record, index">
|
||||
{{ index + 1 }}
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<template>
|
||||
<a href="javascript:;" @click="handleEdit(record)">修改</a>
|
||||
<a v-if="hasPerm('project:edit')" href="javascript:;" @click="$refs.projectStepForm.edit(record)">修改</a>
|
||||
<a-divider type="vertical" />
|
||||
<a-popconfirm title="是否删除?" @confirm="() => handleDelete(record)">
|
||||
<a href="javascript:;">删除</a>
|
||||
<a v-if="hasPerm('project:del')" href="javascript:;">删除</a>
|
||||
</a-popconfirm>
|
||||
<a-divider type="vertical" />
|
||||
<a href="javascript:;" @click="handleDetail(record)">详情</a>
|
||||
|
@ -73,7 +71,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
import { STable } from '@/components'
|
||||
import { getProjectList } from '@/api/project/project'
|
||||
import projectStepForm from './ProjectStepForm'
|
||||
|
@ -139,62 +136,19 @@ export default {
|
|||
return res
|
||||
})
|
||||
},
|
||||
|
||||
selectedRowKeys: [],
|
||||
selectedRows: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.tableOption()
|
||||
},
|
||||
created() {},
|
||||
methods: {
|
||||
// 增
|
||||
handledCreate() {
|
||||
// return this.$router.push(
|
||||
// // {name: 'ProjectForm'}
|
||||
// { path: 'project/project/add' }
|
||||
// )
|
||||
// router.push()
|
||||
return this.$router.push(
|
||||
// {name: 'ProjectForm'}
|
||||
{ path: 'project/project/add' }
|
||||
)
|
||||
},
|
||||
|
||||
tableOption() {
|
||||
if (!this.optionAlertShow) {
|
||||
this.options = {
|
||||
alert: {
|
||||
show: true,
|
||||
clear: () => {
|
||||
this.selectedRowKeys = []
|
||||
},
|
||||
},
|
||||
rowSelection: {
|
||||
selectedRowKeys: this.selectedRowKeys,
|
||||
onChange: this.onSelectChange,
|
||||
},
|
||||
}
|
||||
this.optionAlertShow = true
|
||||
} else {
|
||||
this.options = {
|
||||
alert: false,
|
||||
rowSelection: null,
|
||||
}
|
||||
this.optionAlertShow = false
|
||||
}
|
||||
},
|
||||
|
||||
onSelectChange(selectedRowKeys, selectedRows) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
this.selectedRows = selectedRows
|
||||
},
|
||||
toggleAdvanced() {
|
||||
this.advanced = !this.advanced
|
||||
},
|
||||
|
||||
resetSearchForm() {
|
||||
this.queryParam = {
|
||||
date: moment(new Date()),
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
// @白鸣 发展党员哪个审批信息管理 是哪一级审核才显示,还是审核这一级的上级也能看到
|
||||
</script>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<a-modal
|
||||
:title="modalTitle"
|
||||
:width="1000"
|
||||
:width="1200"
|
||||
:visible="visible"
|
||||
:confirmLoading="confirmLoading"
|
||||
:destroyOnClose="true"
|
||||
|
@ -54,62 +54,22 @@ export default {
|
|||
modalTitle: '新增项目',
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
menuTreeData: [],
|
||||
componentShow: true,
|
||||
componentDisabled: false,
|
||||
componentRequired: true,
|
||||
routerRequired: true,
|
||||
routerShow: true,
|
||||
pidShow: true,
|
||||
permissionShow: true,
|
||||
permissionRequired: true,
|
||||
formLoading: true,
|
||||
type: '',
|
||||
form: this.$form.createForm(this),
|
||||
form: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 新增打开页面初始化
|
||||
add1 (type) {
|
||||
this.modalTitle = "新增菜单"
|
||||
add (type) {
|
||||
this.modalTitle = "新增项目"
|
||||
this.visible = true
|
||||
|
||||
// // 默认选中菜单项,并初始化
|
||||
// this.form.getFieldDecorator('type', { valuePropName: 'checked', initialValue: '1' })
|
||||
// this.meneTypeFunc('1')
|
||||
|
||||
// // 默认选中的单选框
|
||||
// this.form.getFieldDecorator('visible', { initialValue: true })
|
||||
|
||||
// // 默认加载菜单树
|
||||
// this.getMenuTree()
|
||||
|
||||
this.formLoading = false
|
||||
},
|
||||
// 编辑打开页面初始化
|
||||
edit (record) {
|
||||
this.modalTitle = "编辑菜单"
|
||||
console.log(record)
|
||||
this.modalTitle = "编辑项目"
|
||||
this.visible = true
|
||||
|
||||
// // 默认选中菜单项,并初始化
|
||||
// this.form.getFieldDecorator('type', { valuePropName: 'checked', initialValue: record.type.toString() })
|
||||
// this.meneTypeFunc(record.type.toString())
|
||||
|
||||
// // 默认选中的单选框
|
||||
// // eslint-disable-next-line no-unused-vars
|
||||
// const visibleDef = false
|
||||
// // eslint-disable-next-line eqeqeq
|
||||
// if (record.visible == 1) {
|
||||
// this.visibleDef = true
|
||||
// }
|
||||
// this.form.getFieldDecorator('visible', { valuePropName: 'checked', initialValue: this.visibleDef })
|
||||
|
||||
// setTimeout(() => {
|
||||
// this.setMenuItem(record)
|
||||
// // 默认加载菜单树
|
||||
// this.getMenuTree()
|
||||
// }, 100)
|
||||
|
||||
this.formLoading = false
|
||||
},
|
||||
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
<template>
|
||||
<div>
|
||||
<a-modal
|
||||
title="新增种类"
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-form-model ref="classForm" :model="form" :rules="rules" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-form-model-item ref="value" label="种类名称" prop="name">
|
||||
<a-input v-model="form.value" />
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
||||
//例如:import 《组件名称》 from '《组件路径》'
|
||||
import { classAdd } from '@/api/project/class'
|
||||
|
||||
export default {
|
||||
//import引入的组件需要注入到对象中才能使用
|
||||
components: {
|
||||
classAdd,
|
||||
},
|
||||
props: {},
|
||||
data() {
|
||||
//这里存放数据
|
||||
return {
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
form: {
|
||||
value: '',
|
||||
type: 1,
|
||||
},
|
||||
rules: {
|
||||
value: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入种类名称',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
},
|
||||
labelCol: {
|
||||
xs: {
|
||||
span: 24,
|
||||
},
|
||||
sm: {
|
||||
span: 5,
|
||||
},
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: {
|
||||
span: 24,
|
||||
},
|
||||
sm: {
|
||||
span: 18,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
//计算属性 类似于data概念
|
||||
computed: {},
|
||||
//监控data中的数据变化
|
||||
watch: {},
|
||||
//方法集合
|
||||
methods: {
|
||||
showModal() {
|
||||
this.visible = true
|
||||
},
|
||||
handleOk(e) {
|
||||
this.$refs.ClassForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.confirmLoading = true
|
||||
classAdd(this.form).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success('新增成功')
|
||||
this.confirmLoading = false
|
||||
this.handleCancel()
|
||||
} else {
|
||||
this.$message.error('新增失败:' + res.msg)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel(e) {
|
||||
// console.log('Clicked cancel button')
|
||||
this.$refs.table.refresh()
|
||||
this.visible = false
|
||||
},
|
||||
},
|
||||
created() {}, //生命周期 - 创建完成(可以访问当前this实例)
|
||||
mounted() {}, //生命周期 - 挂载完成(可以访问DOM元素)
|
||||
beforeCreate() {}, //生命周期 - 创建之前
|
||||
beforeMount() {}, //生命周期 - 挂载之前
|
||||
beforeUpdate() {}, //生命周期 - 更新之前
|
||||
updated() {}, //生命周期 - 更新之后
|
||||
beforeDestroy() {}, //生命周期 - 销毁之前
|
||||
destroyed() {}, //生命周期 - 销毁完成
|
||||
activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
</style>
|
|
@ -1,37 +1,39 @@
|
|||
<template>
|
||||
<page-header-wrapper title="新增种类">
|
||||
<a-button type="primary" icon="rollback" @click="returnNext">返回</a-button>
|
||||
<a-table ref="table" size="default" rowKey="id" :columns="columns" :data="dataTable" bordered>
|
||||
<a-space align="baseline" direction="vertical" style="width: 100%">
|
||||
<a-button type="primary" icon="plus" @click="$refs.ClassForm.showModal()">新增种类</a-button>
|
||||
<s-table ref="table" rowKey="id" :columns="columns" :data="dataTable" style="width: 100%">
|
||||
<span slot="serial" slot-scope="text, record, index">
|
||||
{{ index + 1 }}
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<template>
|
||||
<a-popconfirm title="是否删除?" @confirm="() => handleDelete(record)">
|
||||
<a-button @click="() => handleDetail(record)">删除</a-button>
|
||||
<a-popconfirm title="是否删除?" @confirm="handledDel(record)">
|
||||
<a-button>删除</a-button>
|
||||
</a-popconfirm>
|
||||
</template>
|
||||
</span>
|
||||
</a-table>
|
||||
</page-header-wrapper>
|
||||
</s-table>
|
||||
<class-form ref="ClassForm"></class-form>
|
||||
</a-space>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { STable } from '@/components'
|
||||
import { classDel, classList } from '@/api/project/class'
|
||||
import ClassForm from './ClassForm'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 加载数据方法 必须为 Promise 对象
|
||||
dataTable: (parameter) => {
|
||||
return classList(Object.assign(parameter, this.queryParam)).then((res) => {
|
||||
dataTable: (parameter) => {
|
||||
return classList(Object.assign(parameter)).then((res) => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
columns: [
|
||||
{ title: '序号', key: 'id', dataIndex: 'id', width: 80, scopedSlots: { customRender: 'serial' } },
|
||||
{ title: '项目种类名称', dataIndex: 'value', key: 'value' },
|
||||
{ title: '项目种类名称', dataIndex: 'value', key: 'value', align: 'center' },
|
||||
{
|
||||
title: '操作',
|
||||
width: 200,
|
||||
|
@ -43,21 +45,22 @@ export default {
|
|||
},
|
||||
components: {
|
||||
STable,
|
||||
ClassForm,
|
||||
classDel,
|
||||
classList
|
||||
},
|
||||
methods: {
|
||||
handledDel(){
|
||||
classDel(Object.assign(parameter,params)).then((res) => {
|
||||
if(res.code == 200){
|
||||
return $this.$message = '操作成功';
|
||||
handledDel(record) {
|
||||
console.log("delete-id",record)
|
||||
classDel({ids:record.id}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success('删除成功')
|
||||
this.$refs.table.refresh(true)
|
||||
}
|
||||
})
|
||||
},
|
||||
returnNext(){
|
||||
|
||||
}
|
||||
getData() {},
|
||||
},
|
||||
created: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -8,23 +8,22 @@
|
|||
<a-button type="primary" icon="search" @click="$refs.table.refresh(true)">查询</a-button>
|
||||
<a-button icon="select" @click="() => (queryParam = {})">添加课程</a-button>
|
||||
</a-space>
|
||||
|
||||
<s-table
|
||||
ref="table"
|
||||
size="default"
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:data="loadData"
|
||||
:rowSelection="options.rowSelection"
|
||||
>
|
||||
<span slot="serial" slot-scope="text, record, index">
|
||||
{{ index + 1 }}
|
||||
</span>
|
||||
<!-- slot-scope="text, record" -->
|
||||
<span slot="action">
|
||||
<span slot="action" slot-scope="text, record" >
|
||||
<template>
|
||||
<a-button type="primary" icon="search" @click="$refs.table.refresh(true)">课程预览</a-button>
|
||||
<a-button type="primary" icon="search" @click="$refs.table.refresh(true)">题库预览</a-button>
|
||||
<a-button type="primary" icon="search" @click="$refs.table.refresh(true)">必选题设置</a-button>
|
||||
<a-button type="primary" @click="$refs.table.refresh(true)">课程预览</a-button>
|
||||
<a-button type="primary" @click="$refs.table.refresh(true)">题库预览</a-button>
|
||||
<a-button type="primary" @click="$refs.table.refresh(true)">必选题设置</a-button>
|
||||
<a-popconfirm title="是否删除?" @confirm="() => handleDelete(record)">
|
||||
<a-button type="primary" @click="$refs.table.refresh(true)">删除</a-button>
|
||||
</a-popconfirm>
|
||||
|
@ -53,7 +52,7 @@ export default {
|
|||
data() {
|
||||
//这里存放数据
|
||||
return {
|
||||
form: this.$form.createForm(this),
|
||||
form: this.$form.createForm(this, { name: 'project' }),
|
||||
totalHours: 0, //总课时
|
||||
totalLearnHours: 0, //总学时
|
||||
totalTopicNum: 0, //题目数量
|
||||
|
|
|
@ -1,127 +1,128 @@
|
|||
<template>
|
||||
<!-- <page-header-wrapper :title="新增项目">
|
||||
<!-- <page-header-wrapper :title="新增项目">
|
||||
v-decorator="['form.XXX', { rules: [{ required: true, message: '项目名称为必填' }] }]"-->
|
||||
<a-form-model :model="form" :label-col="labelCol" :wrapper-col="wrapperCol" layout="horizontal">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="24" :sm="24">
|
||||
<a-form-model-item label="项目名称">
|
||||
<a-input v-model="form.projectName" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="24" :sm="24">
|
||||
<a-form-model-item label="培训种类">
|
||||
<a-select v-model="form.trainClass" placeholder="--请选择--">
|
||||
<a-select-option value="shanghai"> 参数待替换 </a-select-option>
|
||||
</a-select>
|
||||
<a-button type="primary" @click="createClass"> 新增种类 </a-button>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<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="24">
|
||||
<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="24">
|
||||
<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-model :model="form" :label-col="labelCol" :wrapper-col="wrapperCol" layout="horizontal">
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="24" :sm="24">
|
||||
<a-form-model-item label="项目名称">
|
||||
<a-input v-decorator="['projectName',{rules: [{required: true, min: 1, message: '请输入项目名称!'}]}]" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="24" :sm="24">
|
||||
<a-form-model-item label="培训种类">
|
||||
<a-select v-model="form.trainClass" placeholder="--请选择--">
|
||||
<a-select-option value="shanghai"> 参数待替换 </a-select-option>
|
||||
</a-select>
|
||||
<!-- <a-button type="primary" @click="$refs.classList.list()"> 新增种类 </a-button> -->
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<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="24">
|
||||
<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="24">
|
||||
<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>
|
||||
</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>
|
||||
<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-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(50% - 12px)' }">
|
||||
<a-date-picker v-model="form.practiceSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<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="randomResit"> 随机补考 </a-button>
|
||||
</a-form-item>
|
||||
<!-- 考试次数 -->
|
||||
<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>
|
||||
</a-col>
|
||||
<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="randomResit"> 随机补考 </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" @click="toNext"> 上一步 </a-button>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
<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" @click="toNext"> 上一步 </a-button>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
<!-- </page-header-wrapper> -->
|
||||
<!-- <class-list ref="ClassList"></class-list> -->
|
||||
</template>
|
||||
<script>
|
||||
import { dictGet } from '@/api/project/project'
|
||||
|
||||
import ClassList from '../classAdd/ClassList.vue'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
@ -129,16 +130,25 @@ export default {
|
|||
labelCol: { span: 4 },
|
||||
wrapperCol: { span: 14 },
|
||||
personType: [],
|
||||
form: this.$form.createForm(this),
|
||||
form: this.$form.createForm(this, { name: 'project' }),
|
||||
modalTitle: '新增项目',
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
dictGet,
|
||||
ClassList,
|
||||
},
|
||||
created() {
|
||||
created(ClassList) {
|
||||
this.fetchTemplateData()
|
||||
},
|
||||
methods: {
|
||||
add(type) {
|
||||
this.modalTitle = '新增菜单'
|
||||
this.visible = true
|
||||
this.formLoading = false
|
||||
},
|
||||
//获取字典值
|
||||
fetchTemplateData() {
|
||||
console.log('fetchTemplateData')
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<template>
|
||||
<a-form-model :model="form">
|
||||
|
||||
<!-- showSearch -->
|
||||
<!-- height: '500px',overflowY: 'auto' -->
|
||||
|
||||
|
@ -109,7 +108,7 @@ function handleTreeData(data, targetKeys = []) {
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: this.$form.createForm(this),
|
||||
form: this.$form.createForm(this, { name: 'project' }),
|
||||
targetKeys: [],
|
||||
dataSource: transferDataSource,
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<a-input-number v-model="form.sort" />
|
||||
</a-form-model-item>
|
||||
<a-form-model-item ref="remark" label="备注" prop="remark">
|
||||
<a-textarea :rows="4" v-model="form.remark" />
|
||||
<a-textarea :rows="4" v-model="form.remark" >
|
||||
</a-textarea>
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
|
|
Loading…
Reference in New Issue